Skip to content

Commit 74b29f1

Browse files
committed
wip more stuff
1 parent 204b6ea commit 74b29f1

File tree

3 files changed

+41
-7
lines changed

3 files changed

+41
-7
lines changed

packages/ember-cli-fastboot/.eslintrc.js

+13
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,19 @@ module.exports = {
5454
env: {
5555
embertest: true
5656
}
57+
},
58+
59+
// mocha test files
60+
{
61+
files: ['test/**/*.js'],
62+
env: {
63+
node: true,
64+
mocha: true
65+
},
66+
plugins: ['node'],
67+
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
68+
// add your custom rules and overrides for node files here
69+
})
5770
}
5871
]
5972
};

packages/ember-cli-fastboot/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"broccoli-plugin": "^1.3.1",
3131
"chalk": "^2.4.1",
3232
"ember-cli-babel": "^7.1.0",
33-
"ember-cli-blueprint-test-helpers": "^0.19.2",
33+
"ember-cli-blueprint-test-helpers": "mansona/ember-cli-blueprint-test-helpers#fix-ember-generate-options",
3434
"ember-cli-lodash-subset": "2.0.1",
3535
"ember-cli-preprocess-registry": "^3.1.2",
3636
"ember-cli-version-checker": "^3.0.0",
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,44 @@
11
'use strict';
22

33
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');
78

89
const expect = require('ember-cli-blueprint-test-helpers/chai').expect;
910

10-
describe('Acceptance: ember generate and destroy default-blueprint', function() {
11+
describe.only('Acceptance: ember generate and destroy default-blueprint', function() {
1112
setupTestHooks(this);
1213

1314
it('default-blueprint foo', async function() {
1415
let args = ['ember-cli-fastboot'];
1516

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+
1625
// pass any additional command line options in the arguments array
1726
await emberNew();
1827

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);
2041

21-
expect(file('config/targets.js')).to.contain(`node: 'current'`);
42+
// expect(file('config/targets.js')).to.contain(`node: 'current'`);
2243
});
2344
});

0 commit comments

Comments
 (0)