INNER CODE UNIT · JavaScript
mockCli
logandk/serverless-wsgi · index.test.js:1547
const mockCli = Object({ 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: { log: () => { } },
},
{}
);
expect(plugin.hooks["wsgi:exec:exec"]()).to.be.rejectedWith(
"Please provide either a command (-c) or a file (-f)"