Skip to content

Commit

Permalink
fix test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
cspotcode committed Mar 14, 2019
1 parent 157003c commit 7e072e1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/node-unit/cli/run.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ describe('command', function() {
describe('run', function() {
describe('builder', function() {
const IGNORED_OPTIONS = new Set(['help', 'version']);
const options = builder(require('yargs')).getOptions();
const yargs = require('yargs');
// Without doing this first, yargs will throw an error when we call `.positional()` below.
yargs
.command('foo', 'bar', yargs => {
return yargs;
})
.parse(['foo']);
const options = builder(yargs).getOptions();
['number', 'string', 'boolean', 'array'].forEach(type => {
describe(`${type} type`, function() {
Array.from(new Set(options[type])).forEach(option => {
Expand Down

0 comments on commit 7e072e1

Please sign in to comment.