1
0
Fork 0
freesewing/packages/create-freesewing-pattern/tests/cli.test.mjs

18 lines
533 B
JavaScript
Raw Normal View History

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