From fa8ff374ae47d4d6c34504fab6850759afe1c497 Mon Sep 17 00:00:00 2001 From: Harry Vangberg Date: Thu, 19 Dec 2024 21:48:07 +0100 Subject: [PATCH] Run tests in Node shipped with Electron (#36) --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5407911..22d479f 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,8 @@ "dist:win": "electron-builder -w", "publish": "electron-builder --publish always", "eslint": "eslint ./src --ext .js,.jsx,.ts,.tsx", - "test": "jest", - "test-watch": "jest --watch", + "test": "ELECTRON_RUN_AS_NODE=1 electron ./node_modules/.bin/jest", + "test-watch": "ELECTRON_RUN_AS_NODE=1 electron ./node_modules/.bin/jest --watch", "postinstall": "electron-builder install-app-deps", "notarize": "./notarize.sh" },