Skip to content

Commit 553c9f7

Browse files
committed
Add Jest config for ci
- Changed npm scripts: - `test` now runs `lint` then `jest` (the original `test`) - Renamed the original `test` to `jest` - Renamed `watch-test` to `watch-jest` - Added `jest-ci` to run Jest with `jest.config.ci.mjs`
1 parent 0e8c35d commit 553c9f7

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

jest.config.ci.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import baseConfig from './jest.config.mjs';
2+
3+
/** @type {import('jest').Config} */
4+
export default {
5+
...baseConfig,
6+
coverageReporters: ['json'],
7+
reporters: ['default', 'github-actions'],
8+
};

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
"start": "electron ./dist/main.bundle.js",
88
"dev": "rimraf dist && cross-env NODE_ENV=development webpack --watch --progress --color",
99
"prod": "rimraf dist && cross-env NODE_ENV=production webpack --progress --color",
10-
"test": "cross-env NODE_ENV=test NODE_OPTIONS=--experimental-vm-modules NODE_NO_WARNINGS=1 jest",
11-
"watch-test": "npm run test -- --watchAll",
10+
"jest": "cross-env NODE_ENV=test NODE_OPTIONS=--experimental-vm-modules NODE_NO_WARNINGS=1 jest",
11+
"jest-ci": "npm run jest -- --config jest.config.ci.mjs",
12+
"watch-jest": "npm run jest -- --watchAll",
1213
"lint": "eslint . --cache --ext js,jsx,cjs,mjs,ts,tsx",
14+
"test": "npm run lint && npm run jest",
1315
"next-rc": "npm --no-git-tag-version version prerelease --preid=rc",
1416
"next-patch": "npm --no-git-tag-version version patch",
1517
"next-minor": "npm --no-git-tag-version version minor",

0 commit comments

Comments
 (0)