Skip to content

Commit

Permalink
Change Jest runner
Browse files Browse the repository at this point in the history
  • Loading branch information
tassoevan committed Nov 14, 2023
1 parent 882d221 commit 389b6e1
Show file tree
Hide file tree
Showing 3 changed files with 1,471 additions and 3,502 deletions.
22 changes: 3 additions & 19 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,24 @@ module.exports = {
{
preset: 'ts-jest',
errorOnDeprecated: true,
runner: '@jest-runner/electron',
testEnvironment: '@jest-runner/electron/environment',
runner: '@kayahr/jest-electron-runner',
testEnvironment: '@kayahr/jest-electron-runner/environment',
testMatch: [
'<rootDir>/src/*/!(main)/**/*.(spec|test).{js,ts,tsx}',
'<rootDir>/src/**/renderer.(spec|test).{js,ts,tsx}',
],
setupFilesAfterEnv: ['./src/.jest/setup.ts'],
globals: {
'ts-jest': {
tsconfig: {
noUnusedLocals: false,
noUnusedParameters: false,
},
},
},
},
{
preset: 'ts-jest',
errorOnDeprecated: true,
runner: '@jest-runner/electron/main',
runner: '@kayahr/jest-electron-runner/main',
testEnvironment: 'node',
testMatch: [
'<rootDir>/src/*/main/**/*.(spec|test).{js,ts,tsx}',
'<rootDir>/src/**/main.(spec|test).{js,ts,tsx}',
],
setupFilesAfterEnv: ['./src/.jest/setup.ts'],
globals: {
'ts-jest': {
tsconfig: {
noUnusedLocals: false,
noUnusedParameters: false,
},
},
},
},
],
};
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"@babel/preset-react": "^7.16.7",
"@fiahfy/icns-convert": "^0.0.12",
"@fiahfy/ico-convert": "^0.0.12",
"@jest-runner/electron": "^3.0.1",
"@kayahr/jest-electron-runner": "~29.10.0",
"@rocket.chat/eslint-config": "^0.4.0",
"@rocket.chat/eslint-config-alt": "~0.31.25",
"@rocket.chat/prettier-config": "~0.31.25",
Expand Down Expand Up @@ -123,14 +123,15 @@
"eslint": "~8.53.0",
"eslint-import-resolver-typescript": "~3.6.1",
"eslint-plugin-import": "~2.26.0",
"jest": "^26.6.3",
"jest": "~29.7.0",
"jest-environment-jsdom": "~29.7.0",
"jimp": "~0.16.13",
"npm-run-all": "^4.1.5",
"prettier": "^2.5.1",
"puppeteer": "^13.1.2",
"rollup": "~2.79.1",
"rollup-plugin-copy": "~3.4.0",
"ts-jest": "^26.5.6",
"ts-jest": "~29.1.1",
"ts-node": "^10.9.1",
"typescript": "~5.2.2",
"xvfb-maybe": "^0.2.1"
Expand Down
Loading

0 comments on commit 389b6e1

Please sign in to comment.