Skip to content

Commit f8c2dee

Browse files
author
Kelly Selden
committed
failing test for npm addon with peer dep
1 parent 468ac0f commit f8c2dee

File tree

9 files changed

+112
-0
lines changed

9 files changed

+112
-0
lines changed

test/acceptance/ember-cli-update-test.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,7 @@ describe(function() {
394394
fixturesPath: 'test/fixtures/blueprint/addon/legacy-app/local/ideal',
395395
commitMessage: 'my-app',
396396
blueprint: name,
397+
// test semver latest resolution instead of pinned
397398
to: toDefault,
398399
async beforeMerge() {
399400
await initBlueprint({
@@ -417,6 +418,41 @@ describe(function() {
417418
});
418419
});
419420

421+
// this is different than the local test in that it tests
422+
// that peer-deps (requiring ember-cli internals) works
423+
// in existing npm addons
424+
// https://github.com/salsify/ember-cli-dependency-lint/blob/v1.0.3/lib/commands/dependency-lint.js#L5
425+
it('can update a npm addon blueprint', async function() {
426+
this.timeout(15 * 60 * 1000);
427+
428+
let {
429+
name,
430+
version
431+
} = (await loadSafeBlueprintFile('test/fixtures/blueprint/addon/npm-app/merge/my-app')).blueprints[1];
432+
433+
let {
434+
ps,
435+
promise
436+
} = await merge({
437+
fixturesPath: 'test/fixtures/blueprint/addon/npm-app/local',
438+
commitMessage: 'my-app',
439+
blueprint: name,
440+
to: version
441+
});
442+
443+
overwriteBlueprintFiles(ps);
444+
445+
let {
446+
status
447+
} = await promise;
448+
449+
assertNoUnstaged(status);
450+
451+
fixtureCompare({
452+
mergeFixtures: 'test/fixtures/blueprint/addon/npm-app/merge/my-app'
453+
});
454+
});
455+
420456
it('can bootstrap the default blueprint', async function() {
421457
let {
422458
status
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/node_modules/
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"schemaVersion": 0,
3+
"packages": [
4+
{
5+
"name": "ember-cli",
6+
"version": "3.11.0-beta.1",
7+
"blueprints": [
8+
{
9+
"name": "app",
10+
"isBaseBlueprint": true,
11+
"options": [
12+
"--no-welcome"
13+
]
14+
}
15+
]
16+
},
17+
{
18+
"name": "ember-cli-update-npm-addon-test",
19+
"version": "0.0.3",
20+
"blueprints": [
21+
{
22+
"name": "ember-cli-update-npm-addon-test"
23+
}
24+
]
25+
}
26+
]
27+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "my-app",
3+
"version": "0.0.0",
4+
"description": "",
5+
"devDependencies": {
6+
"ember-cli": "~3.11.0-beta.1",
7+
"ember-cli-update-npm-addon-test": "^0.0.3"
8+
}
9+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.0.3
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/node_modules/
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"schemaVersion": 0,
3+
"packages": [
4+
{
5+
"name": "ember-cli",
6+
"version": "3.11.0-beta.1",
7+
"blueprints": [
8+
{
9+
"name": "app",
10+
"isBaseBlueprint": true,
11+
"options": [
12+
"--no-welcome"
13+
]
14+
}
15+
]
16+
},
17+
{
18+
"name": "ember-cli-update-npm-addon-test",
19+
"version": "0.0.4",
20+
"blueprints": [
21+
{
22+
"name": "ember-cli-update-npm-addon-test"
23+
}
24+
]
25+
}
26+
]
27+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "my-app",
3+
"version": "0.0.0",
4+
"description": "",
5+
"devDependencies": {
6+
"ember-cli": "~3.11.0-beta.1",
7+
"ember-cli-update-npm-addon-test": "^0.0.4"
8+
}
9+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.0.4

0 commit comments

Comments
 (0)