Skip to content

Commit ae5f3fd

Browse files
committed
Use ember-try to hack around qunit nodetests issue.
Add an ember:try configuration for running nodetests. In it, remove the ember-cli-qunit dependency from the project, so that the generator test can successfully run with its faked-out dependency instead of finding the *actual* project dependency. Update Travis and AppVeyor configs to use the ember-try scenario instead of running `nodetest` directly.
1 parent 64aaea3 commit ae5f3fd

File tree

5 files changed

+699
-27
lines changed

5 files changed

+699
-27
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ install:
3535

3636
script:
3737
- yarn lint:js
38+
- yarn ember try:one integrated-node-tests
3839
# Usually, it's ok to finish the test scenario without reverting
3940
# to the addon's original dependency state, skipping "cleanup".
40-
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup
41-
- yarn run nodetest
41+
- yarn ember try:one $EMBER_TRY_SCENARIO --skip-cleanup
4242

4343
# We build PRs, but don't trigger separate builds for the PR from the branch.
4444
branches:

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ test_script:
2828
# Output useful info for debugging.
2929
- yarn versions
3030
- cmd: yarn ember try:one ember-release
31-
- cmd: yarn run nodetest
31+
- cmd: yarn ember try:one integrated-node-tests
3232

3333
# Don't actually build.
3434
build: off

config/ember-try.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
module.exports = {
22
useYarn: true,
33
scenarios: [
4+
{
5+
name: 'integrated-node-tests',
6+
command: 'yarn nodetest',
7+
npm: {
8+
devDependencies: {
9+
'ember-cli-qunit': null,
10+
},
11+
},
12+
},
413
{
514
name: 'ember-lts-2.12',
615
npm: {

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
"ember-cli-htmlbars": "^2.0.1",
6969
"ember-cli-htmlbars-inline-precompile": "^1.0.0",
7070
"ember-cli-inject-live-reload": "^1.4.1",
71+
"ember-cli-qunit": "^4.3.0",
7172
"ember-cli-release": "^0.2.9",
7273
"ember-cli-shims": "^1.2.0",
7374
"ember-cli-sri": "^2.1.0",

0 commit comments

Comments
 (0)