Skip to content

Commit 31f42c7

Browse files
author
Kelly Selden
committed
use proper promises in sinon stubs
1 parent 31b6db6 commit 31f42c7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

test/unit/get-default-blueprint-name-override-test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ describe(getBlueprintNameOverride, function() {
1414
});
1515

1616
it('returns default blueprint override name if it exists', async function() {
17-
sinon.stub(npm, 'json').returns({
17+
sinon.stub(npm, 'json').resolves({
1818
name: packageName,
1919
'ember-addon': {
2020
defaultBlueprint: 'not-the-same-name'
@@ -27,7 +27,7 @@ describe(getBlueprintNameOverride, function() {
2727
});
2828

2929
it('Null if property does not exist in package.json', async function() {
30-
sinon.stub(npm, 'json').returns({
30+
sinon.stub(npm, 'json').resolves({
3131
name: packageName
3232
});
3333

@@ -37,7 +37,7 @@ describe(getBlueprintNameOverride, function() {
3737
});
3838

3939
it('Error in spawn returns null', async function() {
40-
sinon.stub(npm, 'json').throwsException();
40+
sinon.stub(npm, 'json').rejects();
4141

4242
let defaultBlueprintOverride = await getBlueprintNameOverride(packageName);
4343

0 commit comments

Comments
 (0)