Skip to content

Commit f08cfc9

Browse files
committed
test: migrate to vitest (jest->vi codemod, enzyme harness); 80/96 files green
- vitest.setup.js: enzyme-adapter-react-16, enzyme-to-json serializer, rAF/ matchMedia polyfills, automocks (electron/fs/electron-log/redux-logger/uuid) - codemod jest.* -> vi.* across all test files and __mocks__ - install jsdom; pin cheerio 1.0.0-rc.3 override (enzyme 3 needs lib/utils subpath) 14 files still failing (done()-callbacks, ESM export reassignment, vi.mock default keys, obsolete snapshots) — fixed next.
1 parent f0b5ef1 commit f08cfc9

86 files changed

Lines changed: 1990 additions & 524 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

__mocks__/electron.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/* eslint-env jest */
22

33
const dialog = {
4-
showMessageBox: jest.fn().mockImplementation(() => Promise.resolve('response')),
5-
showOpenDialog: jest.fn().mockImplementation(() => Promise.resolve('response')),
4+
showMessageBox: vi.fn().mockImplementation(() => Promise.resolve('response')),
5+
showOpenDialog: vi.fn().mockImplementation(() => Promise.resolve('response')),
66
};
77

88
const app = {
9-
getVersion: jest.fn(() => '0.0.0'),
10-
getPath: jest.fn(() => '/dev/null/get/electron/path'),
9+
getVersion: vi.fn(() => '0.0.0'),
10+
getPath: vi.fn(() => '/dev/null/get/electron/path'),
1111
};
1212

1313
module.exports = {

0 commit comments

Comments
 (0)