We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1fc0d9c commit 2f62ad9Copy full SHA for 2f62ad9
test/cli-test.js
@@ -40,5 +40,24 @@ test('Test cli flags', (t) => {
40
})
41
42
43
+ t.test('test version flag', (tt) => {
44
+ const ls = spawn('./bin/cmd.js', ['--version'])
45
+ let compiledData = ''
46
+ ls.stdout.on('data', (data) => {
47
+ compiledData += data
48
+ })
49
+
50
+ ls.stderr.on('data', (data) => {
51
+ tt.fail('This should not happen')
52
53
54
+ ls.on('close', (code) => {
55
+ tt.equal(compiledData.trim(),
56
+ `core-validate-commit v${require('../package.json').version}`,
57
+ 'output is equal')
58
+ tt.end()
59
60
61
62
t.end()
63
0 commit comments