mirror of
https://github.com/knex/knex.git
synced 2025-07-10 10:31:43 +00:00
26 lines
658 B
JavaScript
26 lines
658 B
JavaScript
'use strict';
|
|
|
|
const path = require('path');
|
|
const { execCommand } = require('cli-testlab');
|
|
|
|
const cliPkg = require('../../package');
|
|
const KNEX = path.normalize(__dirname + '/../../bin/cli.js');
|
|
|
|
describe('version', () => {
|
|
it('Print correct knex CLI version', () => {
|
|
const expectedKnexCliVersion = cliPkg.version;
|
|
|
|
return execCommand(`node ${KNEX} --version`, {
|
|
expectedOutput: expectedKnexCliVersion,
|
|
});
|
|
});
|
|
|
|
it('Print correct knex CLI version using -V flag', () => {
|
|
const expectedKnexCliVersion = cliPkg.version;
|
|
|
|
return execCommand(`node ${KNEX} -V`, {
|
|
expectedOutput: expectedKnexCliVersion,
|
|
});
|
|
});
|
|
});
|