|
1 | 1 | 'use strict';
|
2 | 2 |
|
3 | 3 | const blueprintHelpers = require('ember-cli-blueprint-test-helpers/helpers');
|
4 |
| -const setupTestHooks = blueprintHelpers.setupTestHooks; |
5 |
| -const emberNew = blueprintHelpers.emberNew; |
6 |
| -const emberGenerateDestroy = blueprintHelpers.emberGenerateDestroy; |
| 4 | + |
| 5 | +const { emberGenerate, emberNew, setupTestHooks } = blueprintHelpers; |
| 6 | + |
| 7 | +const MockUI = require('console-ui/mock'); |
7 | 8 |
|
8 | 9 | const expect = require('ember-cli-blueprint-test-helpers/chai').expect;
|
9 | 10 |
|
10 |
| -describe('Acceptance: ember generate and destroy default-blueprint', function() { |
| 11 | +describe.only('Acceptance: ember generate and destroy default-blueprint', function() { |
11 | 12 | setupTestHooks(this);
|
12 | 13 |
|
13 | 14 | it('default-blueprint foo', async function() {
|
14 | 15 | let args = ['ember-cli-fastboot'];
|
15 | 16 |
|
| 17 | + // process.stdout.on('data', function(data) { |
| 18 | + // console.log('face', data.toString()); |
| 19 | + // process.stdin.writeLine('y'); |
| 20 | + // // process.stdout.write(data); |
| 21 | + // }); |
| 22 | + |
| 23 | + |
| 24 | + |
16 | 25 | // pass any additional command line options in the arguments array
|
17 | 26 | await emberNew();
|
18 | 27 |
|
19 |
| - const file = await emberGenerateDestroy(args); |
| 28 | + // let ui = new MockUI(); |
| 29 | + |
| 30 | + // let interval = setInterval(() => { |
| 31 | + // ui.inputStream.write('y\n\r'); |
| 32 | + // }, 2000); |
| 33 | + |
| 34 | + const ember = await emberGenerate(args); |
| 35 | + |
| 36 | + setTimeout(() => { |
| 37 | + ember.inputStream.write('y\n'); |
| 38 | + }, 4000) |
| 39 | + |
| 40 | + // clearInterval(interval); |
20 | 41 |
|
21 |
| - expect(file('config/targets.js')).to.contain(`node: 'current'`); |
| 42 | + // expect(file('config/targets.js')).to.contain(`node: 'current'`); |
22 | 43 | });
|
23 | 44 | });
|
0 commit comments