test: test case for default behavior

This commit is contained in:
jamesgeorge007 2020-10-28 16:20:58 +05:30
parent c39fc1df3e
commit 5bff2c6221

10
lib/cli/test/cli.test.js Executable file
View File

@ -0,0 +1,10 @@
const { run } = require('./helpers');
describe('Default behavior', () => {
it('suggests the closest match to an unknown command', () => {
const { output, status } = run(['upgraed']);
const stdout = output.toString();
expect(stdout).toContain('Did you mean upgrade?');
expect(status).toBe(1);
});
});