Skip to content

Commit 44e7f0b

Browse files
authored
test: bump Electron and drop ElectronExitReporter (#454)
1 parent d0c7cc8 commit 44e7f0b

6 files changed

Lines changed: 62 additions & 577 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"devDependencies": {
4747
"@tsconfig/node22": "^22.0.1",
4848
"@types/node": "^22.12.0",
49-
"electron": "^39.8.4",
49+
"electron": "^43.0.0",
5050
"husky": "^9.1.7",
5151
"lint-staged": "^16.2.7",
5252
"oxfmt": "^0.44.0",

test/vitest.global.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export function teardown() {
2+
// Vitest lets the process exit naturally, but with Electron we stay
3+
// alive unless explicitly told to exit, so on teardown quite Electron
4+
if (process.versions.electron && !process.env.ELECTRON_RUN_AS_NODE) {
5+
const { app } = require('electron');
6+
app.quit();
7+
}
8+
}

test/vitest.setup.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

vitest.config.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
import { defineConfig } from 'vitest/config';
2-
import ElectronExitReporter from './vitest.electron-reporter';
32

43
export default defineConfig({
54
test: {
65
globals: true,
76
environment: 'node',
87
include: ['test/**/*-spec.ts'],
9-
setupFiles: ['test/vitest.setup.ts'],
8+
globalSetup: 'test/vitest.global.ts',
109
testTimeout: 10000,
1110
fileParallelism: false,
1211
pool: 'forks',
13-
reporters: ['default', new ElectronExitReporter()],
12+
reporters: ['default'],
1413
},
1514
});

vitest.electron-reporter.ts

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)