Skip to content

Commit 105cb40

Browse files
committed
Fix test
1 parent c0a1221 commit 105cb40

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/cmd/device-protection.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,12 +391,13 @@ describe('DeviceProtectionCommands', () => {
391391
});
392392

393393
it('shows the spinner', async () => {
394-
const fn = sinon.stub().returns(1234);
394+
const promise = Promise.resolve(1234);
395+
const fn = sinon.stub().returns(promise);
395396
sinon.stub(deviceProtectionCommands.ui, 'showBusySpinnerUntilResolved').resolves();
396397

397398
await deviceProtectionCommands._withDevice({ spinner: 'Long operation' }, fn);
398399

399-
expect(deviceProtectionCommands.ui.showBusySpinnerUntilResolved).to.have.been.calledWith('Long operation', 1234);
400+
expect(deviceProtectionCommands.ui.showBusySpinnerUntilResolved).to.have.been.calledWith('Long operation', promise);
400401
});
401402
});
402403

0 commit comments

Comments
 (0)