1
0
Fork 0

Add smoke test for create-freesewing-pattern.

This commit is contained in:
Nick Dower 2022-02-18 20:32:12 +01:00
parent f555f15750
commit 647e566dc0
3 changed files with 22 additions and 2 deletions

View 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();
}
})
})