INNER CODE UNIT · JavaScript
mockCli
logandk/serverless-wsgi · index.test.js:1683
const mockCli = { log: () => { } };
it("fails when invoked without command or file", () => {
var plugin = new Plugin(
{
config: { servicePath: "/tmp" },
service: {
provider: { runtime: "python2.7" },
custom: { wsgi: { app: "api.app" } },
},
classes: { Error: Error },
cli: mockCli,
},
{}
);
return expect(plugin.hooks["wsgi:exec:local:exec"]()).to.be.rejectedWith(
"Please provide either a command (-c) or a file (-f)"