Skip to content

Commit

Permalink
test: fix error in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
dsanders11 committed Aug 29, 2023
1 parent cab0f13 commit 6ccf827
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/main/main-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ import { getOrCreateMainWindow } from '../../src/main/windows';
import { BrowserWindowMock } from '../mocks/browser-window';
import { overridePlatform, resetPlatform } from '../utils';

// Need to mock this out or CI will hit an error due to
// code being run async continuing after the test ends:
// > ReferenceError: You are trying to `import` a file
// > after the Jest environment has been torn down.
jest.mock('getos');

jest.mock('../../src/main/windows', () => ({
getOrCreateMainWindow: jest.fn(),
mainIsReady: jest.fn(),
Expand Down

0 comments on commit 6ccf827

Please sign in to comment.