Skip to content

Commit

Permalink
Fix electron command unit test
Browse files Browse the repository at this point in the history
When running not in CI, the electron command unit test was showing a building spinner, which pollutes the test output and can cause the process to not exit because of a leaked interval timer, so stub out the progress methods
  • Loading branch information
bendemboski committed May 21, 2020
1 parent b5ee735 commit 05f16f8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion node-tests/integration/commands/electron-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,16 @@ describe('electron command', function() {
}, 1);
return Promise.resolve(mockProcess);
});

let ui = new MockUI();
// Disable progress UI, since it pollutes test output and can leak an
// interval timer, causing the mocha process to not exit when tests are
// complete
sinon.stub(ui, 'startProgress');
sinon.stub(ui, 'stopProgress');

command = new ElectronCommand({
ui: new MockUI(),
ui,
analytics: new MockAnalytics(),
settings: {},
project: new MockProject(),
Expand Down

0 comments on commit 05f16f8

Please sign in to comment.