Skip to content

Commit 97c2a4e

Browse files
authored
Fix cli version test (#295)
Co-authored-by: Martin Acosta <Martín Acosta>
1 parent 55d73b3 commit 97c2a4e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/unit/cli.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const yaml = require('js-yaml')
77
const exec = require('child_process').exec
88
const tempy = require('tempy')
99

10+
const version = require('../../package.json').version
1011
const dir = path.resolve(__dirname, '../../bin')
1112
const bin = path.join(dir, 'airtap.js')
1213
const read = (fp) => fs.readFileSync(path.join(dir, fp), 'utf8')
@@ -15,7 +16,7 @@ const env = Object.assign({}, process.env, { FORCE_COLOR: '0' })
1516
test('cli prints out version with -v', function (t) {
1617
exec(`node ${bin} -v`, { env }, (err, stdout, stderr) => {
1718
t.ifError(err, 'no error')
18-
t.is(stdout.trim(), '3.0.0')
19+
t.is(stdout.trim(), version)
1920
t.is(stderr.trim(), '')
2021
t.end()
2122
})

0 commit comments

Comments
 (0)