Skip to content

Commit

Permalink
Fix cli version test (#295)
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Acosta <Martín Acosta>
  • Loading branch information
tinchoz49 authored Sep 19, 2020
1 parent 55d73b3 commit 97c2a4e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/unit/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const yaml = require('js-yaml')
const exec = require('child_process').exec
const tempy = require('tempy')

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

0 comments on commit 97c2a4e

Please sign in to comment.