Skip to content

Commit f4d0996

Browse files
committed
test: specify the electron-mocha tests
1 parent 5323706 commit f4d0996

File tree

5 files changed

+392
-9
lines changed

5 files changed

+392
-9
lines changed

.github/workflows/CI.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,15 +195,14 @@ jobs:
195195
- name: Clean Tmp
196196
run: rm -rf ./tmp
197197
shell: bash
198-
198+
199199
- name: Test Electron Windows/MacOS
200200
if: "${{ !matrix.docker }}"
201201
uses: nick-fields/retry@v3
202202
with:
203203
timeout_minutes: 5
204204
max_attempts: 1
205205
command: |
206-
pnpm install -g electron@latest
207206
pnpm run test.electron.main
208207
continue-on-error: true
209208

@@ -215,7 +214,6 @@ jobs:
215214
max_attempts: 1
216215
command: |
217216
sudo apt-get install xvfb
218-
pnpm install -g electron@latest
219217
xvfb-run --auto-servernum pnpm run test.electron.main
220218
continue-on-error: true
221219

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"cross-env": "^7.0.3",
4040
"deasync": "^0.1.30",
4141
"downlevel-dts": "^0.11.0",
42+
"electron": "^33.1.0",
4243
"electron-mocha": "^13.0.0",
4344
"eslint": "^8.57.1",
4445
"eslint-config-atomic": "^1.22.1",
@@ -102,15 +103,15 @@
102103
"build": "run-p build.js build.native",
103104
"build.debug": "run-s build.js build.native.debug",
104105
"test": "run-s test.unit",
105-
"test.unit": "run-s clean.temp build && cross-env INCLUDE_COMPAT_TESTS=false mocha ./test/unit/*-test.ts",
106+
"test.unit": "run-s clean.temp build && mocha ./test/unit/*-test.ts",
106107
"test.unit.compat": "run-s clean.temp build && cross-env INCLUDE_COMPAT_TESTS=true mocha ./test/unit/compat/*-test.ts",
108+
"test.unit.nogc": "run-s clean.temp build && cross-env SKIP_GC_TESTS=true mocha",
109+
"test.electron.main": "run-s clean.temp build && electron-mocha ./test/unit/*-test.ts",
110+
"test.electron.renderer": "run-s build && electron-mocha --renderer ./test/unit/*-test.ts",
107111
"test.smoke": "bash ./script/smoke-test.bash",
108-
"test.skip_gc_tests": "run-s clean.temp build && cross-env SKIP_GC_TESTS=true mocha",
109-
"test.electron.main": "run-s clean.temp build && electron-mocha",
110112
"format": "run-s format.prettier format.clang-format",
111113
"format.prettier": "prettier -l --cache --cache-location ./.cache/prettier --write .",
112114
"format.clang-format": "clang-format -i -style=file ./src/*.cc ./src/*.h ./src/util/*.h",
113-
"test.electron.renderer": "run-s build && electron-mocha --renderer",
114115
"lint-test.eslint": "eslint ./**/*.{ts,tsx,js,jsx,cjs,mjs,json,yaml} --no-error-on-unmatched-pattern --cache --cache-location ./.cache/eslint/",
115116
"lint.eslint": "pnpm run lint-test.eslint --fix",
116117
"lint.tsc": "tsc --noEmit -p ./src/tsconfig.json",

0 commit comments

Comments
 (0)