Skip to content

Commit e275733

Browse files
author
Kelly Selden
committed
use blueprint.location in getBaseBlueprint
1 parent fe2aa67 commit e275733

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

src/get-base-blueprint.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ async function getBaseBlueprint({
2323
if (baseBlueprint.location) {
2424
let parsedPackage = await parseBlueprintPackage({
2525
cwd,
26-
blueprint: baseBlueprint
26+
blueprint: baseBlueprint.location
2727
});
2828
let downloadedPackage = await downloadPackage(
2929
baseBlueprint.packageName,

test/integration/index-test.js

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -447,17 +447,30 @@ applicable codemods: ember-modules-codemod, ember-qunit-codemod, ember-test-help
447447
});
448448

449449
it('can update an npm blueprint', async function() {
450-
let {
451-
name
452-
} = (await loadSafeBlueprintFile('test/fixtures/blueprint/app/npm-app/merge/my-app/config/ember-cli-update.json')).blueprints[1];
450+
let [
451+
{
452+
location
453+
},
454+
{
455+
name
456+
}
457+
] = (await loadSafeBlueprintFile('test/fixtures/blueprint/app/npm-app/merge/my-app/config/ember-cli-update.json')).blueprints;
453458

454459
let {
455460
status
456461
} = await merge({
457462
fixturesPath: 'test/fixtures/blueprint/app/npm-app/local',
458463
commitMessage: 'my-app',
459464
blueprint: name,
460-
to: toDefault
465+
to: toDefault,
466+
async beforeMerge() {
467+
// test local base blueprints
468+
await initBlueprint({
469+
fixturesPath: 'test/fixtures/blueprint/app/local',
470+
resolvedFrom: tmpPath,
471+
relativeDir: location
472+
});
473+
}
461474
});
462475

463476
fixtureCompare({

0 commit comments

Comments
 (0)