aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/electronJest.cjs
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/electronJest.cjs')
-rw-r--r--scripts/electronJest.cjs12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/electronJest.cjs b/scripts/electronJest.cjs
new file mode 100644
index 0000000..a7b7986
--- /dev/null
+++ b/scripts/electronJest.cjs
@@ -0,0 +1,12 @@
1const { app } = require('electron');
2
3if (process.env.DISABLE_GPU === 'true') {
4 app.disableHardwareAcceleration();
5}
6
7app.on('window-all-closed', () => {
8 // Handle event to avoid exiting the application in watch mode.
9});
10
11// @ts-expect-error -- `jest-cli` has no typescript declaration.
12require('jest-cli/bin/jest');