Skip to content

Commit

Permalink
test: specify the electron-mocha tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Nov 6, 2024
1 parent 5323706 commit f4d0996
Show file tree
Hide file tree
Showing 5 changed files with 392 additions and 9 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,15 +195,14 @@ jobs:
- name: Clean Tmp
run: rm -rf ./tmp
shell: bash

- name: Test Electron Windows/MacOS
if: "${{ !matrix.docker }}"
uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 1
command: |
pnpm install -g electron@latest
pnpm run test.electron.main
continue-on-error: true

Expand All @@ -215,7 +214,6 @@ jobs:
max_attempts: 1
command: |
sudo apt-get install xvfb
pnpm install -g electron@latest
xvfb-run --auto-servernum pnpm run test.electron.main
continue-on-error: true

Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"cross-env": "^7.0.3",
"deasync": "^0.1.30",
"downlevel-dts": "^0.11.0",
"electron": "^33.1.0",
"electron-mocha": "^13.0.0",
"eslint": "^8.57.1",
"eslint-config-atomic": "^1.22.1",
Expand Down Expand Up @@ -102,15 +103,15 @@
"build": "run-p build.js build.native",
"build.debug": "run-s build.js build.native.debug",
"test": "run-s test.unit",
"test.unit": "run-s clean.temp build && cross-env INCLUDE_COMPAT_TESTS=false mocha ./test/unit/*-test.ts",
"test.unit": "run-s clean.temp build && mocha ./test/unit/*-test.ts",
"test.unit.compat": "run-s clean.temp build && cross-env INCLUDE_COMPAT_TESTS=true mocha ./test/unit/compat/*-test.ts",
"test.unit.nogc": "run-s clean.temp build && cross-env SKIP_GC_TESTS=true mocha",
"test.electron.main": "run-s clean.temp build && electron-mocha ./test/unit/*-test.ts",
"test.electron.renderer": "run-s build && electron-mocha --renderer ./test/unit/*-test.ts",
"test.smoke": "bash ./script/smoke-test.bash",
"test.skip_gc_tests": "run-s clean.temp build && cross-env SKIP_GC_TESTS=true mocha",
"test.electron.main": "run-s clean.temp build && electron-mocha",
"format": "run-s format.prettier format.clang-format",
"format.prettier": "prettier -l --cache --cache-location ./.cache/prettier --write .",
"format.clang-format": "clang-format -i -style=file ./src/*.cc ./src/*.h ./src/util/*.h",
"test.electron.renderer": "run-s build && electron-mocha --renderer",
"lint-test.eslint": "eslint ./**/*.{ts,tsx,js,jsx,cjs,mjs,json,yaml} --no-error-on-unmatched-pattern --cache --cache-location ./.cache/eslint/",
"lint.eslint": "pnpm run lint-test.eslint --fix",
"lint.tsc": "tsc --noEmit -p ./src/tsconfig.json",
Expand Down
Loading

0 comments on commit f4d0996

Please sign in to comment.