node-clinic/test/cli-bubbleprof-version.test.js
2018-07-23 23:30:20 +02:00

27 lines
607 B
JavaScript

'use strict'
const test = require('tap').test
const cli = require('./cli.js')
test('clinic bubbleprof --version', function (t) {
cli({}, ['clinic', 'bubbleprof', '--version'], function (err, stdout) {
t.ifError(err)
t.strictEqual(
stdout,
`v${require('@nearform/bubbleprof/package.json').version}\n`
)
t.end()
})
})
test('clinic bubbleprof -v', function (t) {
cli({}, ['clinic', 'bubbleprof', '-v'], function (err, stdout) {
t.ifError(err)
t.strictEqual(
stdout,
`v${require('@nearform/bubbleprof/package.json').version}\n`
)
t.end()
})
})