diff options
Diffstat (limited to 'scripts/electronJest.cjs')
-rw-r--r-- | scripts/electronJest.cjs | 12 |
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 @@ | |||
1 | const { app } = require('electron'); | ||
2 | |||
3 | if (process.env.DISABLE_GPU === 'true') { | ||
4 | app.disableHardwareAcceleration(); | ||
5 | } | ||
6 | |||
7 | app.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. | ||
12 | require('jest-cli/bin/jest'); | ||