Skip to content

Commit 3602b27

Browse files
author
Kelly Selden
committed
fix blueprint option test assertions
1 parent 2847e93 commit 3602b27

1 file changed

Lines changed: 26 additions & 6 deletions

File tree

test/unit/get-start-and-end-commands-test.js

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -446,27 +446,47 @@ describe(_getStartAndEndCommands, function() {
446446
}
447447

448448
it('can create an app', async function() {
449-
expect(await processBlueprint()).to.include('new');
449+
let args = await processBlueprint();
450+
451+
let i = args.indexOf('-b');
452+
453+
expect(i).to.not.equal(-1);
454+
455+
expect(args[i + 1]).to.equal('app');
450456
});
451457

452458
it('can create an addon', async function() {
453-
expect(await processBlueprint({ type: 'addon' })).to.include('addon');
459+
let args = await processBlueprint({ type: 'addon' });
460+
461+
let i = args.indexOf('-b');
462+
463+
expect(i).to.not.equal(-1);
464+
465+
expect(args[i + 1]).to.equal('addon');
454466
});
455467

456468
it('can create an app with the --no-welcome option', async function() {
457-
expect(await processBlueprint({ options: ['--no-welcome'] })).to.include('--no-welcome');
469+
let args = await processBlueprint({ options: ['--no-welcome'] });
470+
471+
expect(args).to.include('--no-welcome');
458472
});
459473

460474
it('can create an app without the --no-welcome option', async function() {
461-
expect(await processBlueprint()).to.not.include('--no-welcome');
475+
let args = await processBlueprint();
476+
477+
expect(args).to.not.include('--no-welcome');
462478
});
463479

464480
it('can create an app without the yarn option', async function() {
465-
expect(await processBlueprint()).to.not.include('--yarn');
481+
let args = await processBlueprint();
482+
483+
expect(args).to.not.include('--yarn');
466484
});
467485

468486
it('can create an app with the yarn option', async function() {
469-
expect(await processBlueprint({ options: ['--yarn'] })).to.include('--yarn');
487+
let args = await processBlueprint({ options: ['--yarn'] });
488+
489+
expect(args).to.include('--yarn');
470490
});
471491
});
472492

0 commit comments

Comments
 (0)