UNPKG

ci-scripts

Version:

Useful scripts to execute from your CI runner. For example, post to Slack and GitHub when your build completes:

11 lines (9 loc) 433 B
const {execSync} = require('child_process'); const pkg = require('../../package.json'); describe('version command', () => { test('returns correct version', () => { expect(execSync('./bin/ci.js version').toString().trim()).toBe(pkg.version); expect(execSync('./bin/ci.js -v').toString().trim()).toBe(pkg.version); expect(execSync('./bin/ci.js --version').toString().trim()).toBe(pkg.version); }); });