Add smoke test for create-freesewing-pattern.
This commit is contained in:
parent
f555f15750
commit
647e566dc0
3 changed files with 22 additions and 2 deletions
17
packages/create-freesewing-pattern/tests/cli.test.mjs
Normal file
17
packages/create-freesewing-pattern/tests/cli.test.mjs
Normal file
|
@ -0,0 +1,17 @@
|
|||
import chai from 'chai'
|
||||
import { spawnSync } from 'child_process'
|
||||
|
||||
describe('CLI help', () => {
|
||||
it("Should run successfully", () => {
|
||||
const result = spawnSync('node', ['./lib/cli.js', '-h'])
|
||||
if (result.status != 0) {
|
||||
console.log('Command failed: node ./lib/cli.js -h');
|
||||
console.log('status: ' + result.status);
|
||||
console.log('stdout:')
|
||||
console.log(result.stdout.toString('utf8'));
|
||||
console.log('stderr:')
|
||||
console.log(result.stderr.toString('utf8'));
|
||||
chai.assert.fail();
|
||||
}
|
||||
})
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue