Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mifi committed Apr 6, 2024
1 parent ea9da25 commit 5e97814
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ test('skip enabling 2FA if the package exists', async t => {
verifyWorkingTreeIsClean: sinon.stub(),
},
'../source/npm/enable-2fa.js': enable2faStub,
'../source/npm/publish.js': sinon.stub().returns({pipe: sinon.stub()}),
'../source/npm/publish.js': {
getPackagePublishArguments: sinon.stub().returns([]),
runPublish: sinon.stub().returns(fakeExecaReturn()),
},
});

await t.notThrowsAsync(npMock('1.0.0', {
Expand Down Expand Up @@ -91,7 +94,10 @@ test('skip enabling 2FA if the `2fa` option is false', async t => {
verifyWorkingTreeIsClean: sinon.stub(),
},
'../source/npm/enable-2fa.js': enable2faStub,
'../source/npm/publish.js': sinon.stub().returns({pipe: sinon.stub()}),
'../source/npm/publish.js': {
getPackagePublishArguments: sinon.stub().returns([]),
runPublish: sinon.stub().returns(fakeExecaReturn()),
},
});

await t.notThrowsAsync(npMock('1.0.0', {
Expand Down

0 comments on commit 5e97814

Please sign in to comment.