Skip to content

Commit 29ea095

Browse files
author
Kelly Selden
committed
add a test for a missing blueprint commit (when init)
1 parent 842d927 commit 29ea095

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

test/unit/get-start-and-end-commands-test.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,44 @@ describe(_getStartAndEndCommands, function() {
283283
expect(overwriteBlueprintFilesStub.args).to.deep.equal([['test npx'], ['test npx']]);
284284
});
285285

286+
it('can create a project without a blueprint', async function() {
287+
let { createProjectFromRemote } = getStartAndEndCommands();
288+
289+
let createProject = createProjectFromRemote({
290+
options: {
291+
baseBlueprint,
292+
projectName
293+
}
294+
});
295+
296+
sinon.stub(utils, 'require')
297+
.withArgs(path.join(blueprintPath, 'package'))
298+
.returns({ keywords: ['ember-blueprint'] });
299+
300+
expect(await createProject(cwd)).to.equal(projectRoot);
301+
302+
expect(npxStub.args).to.deep.equal([[
303+
[
304+
'-p',
305+
`${baseBlueprint.packageName}@${baseBlueprint.version}`,
306+
commandName,
307+
'new',
308+
projectName,
309+
'-sg',
310+
'-sn',
311+
'-sb',
312+
'-b',
313+
baseBlueprint.name,
314+
...baseBlueprint.options
315+
],
316+
{
317+
cwd
318+
}
319+
]]);
320+
321+
expect(overwriteBlueprintFilesStub.args).to.deep.equal([['test npx']]);
322+
});
323+
286324
describe('custom blueprint', function() {
287325
it('returns an options object - base default', async function() {
288326
let options = getStartAndEndCommands({

0 commit comments

Comments
 (0)