-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
41 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 27 additions & 6 deletions
33
packages/ember-cli-fastboot/test/default-blueprint-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,44 @@ | ||
'use strict'; | ||
|
||
const blueprintHelpers = require('ember-cli-blueprint-test-helpers/helpers'); | ||
const setupTestHooks = blueprintHelpers.setupTestHooks; | ||
const emberNew = blueprintHelpers.emberNew; | ||
const emberGenerateDestroy = blueprintHelpers.emberGenerateDestroy; | ||
|
||
const { emberGenerate, emberNew, setupTestHooks } = blueprintHelpers; | ||
|
||
const MockUI = require('console-ui/mock'); | ||
|
||
const expect = require('ember-cli-blueprint-test-helpers/chai').expect; | ||
|
||
describe('Acceptance: ember generate and destroy default-blueprint', function() { | ||
describe.only('Acceptance: ember generate and destroy default-blueprint', function() { | ||
setupTestHooks(this); | ||
|
||
it('default-blueprint foo', async function() { | ||
let args = ['ember-cli-fastboot']; | ||
|
||
// process.stdout.on('data', function(data) { | ||
// console.log('face', data.toString()); | ||
// process.stdin.writeLine('y'); | ||
// // process.stdout.write(data); | ||
// }); | ||
|
||
|
||
|
||
// pass any additional command line options in the arguments array | ||
await emberNew(); | ||
|
||
const file = await emberGenerateDestroy(args); | ||
// let ui = new MockUI(); | ||
|
||
// let interval = setInterval(() => { | ||
// ui.inputStream.write('y\n\r'); | ||
// }, 2000); | ||
|
||
const ember = await emberGenerate(args); | ||
|
||
setTimeout(() => { | ||
ember.inputStream.write('y\n'); | ||
}, 4000) | ||
|
||
// clearInterval(interval); | ||
|
||
expect(file('config/targets.js')).to.contain(`node: 'current'`); | ||
// expect(file('config/targets.js')).to.contain(`node: 'current'`); | ||
}); | ||
}); |