storybook/lib/cli/test/default/cli.test.js
2020-11-28 13:09:42 +05:30

13 lines
388 B
JavaScript
Executable File

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