cli.js 403 B

12345678910111213
  1. import path from 'path';
  2. import test from 'ava';
  3. import execa from 'execa';
  4. const cwd = path.dirname(__dirname);
  5. const packageJson = require(path.join(cwd, 'package.json'));
  6. const cli = (args, opts) => execa(path.join(cwd, 'cli.js'), args, opts);
  7. test('runs no-local install of XO', async t => {
  8. const {stdout} = await cli(['--no-local', '--version'], {cwd});
  9. t.is(stdout, packageJson.version);
  10. });