Skip to content

Commit 723c8f8

Browse files
committed
fix: fix bug with locating opossum-file binary when running test:e2e
1 parent 7bea133 commit 723c8f8

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
"test:unit": "jest",
119119
"test:changed": "jest --onlyChanged",
120120
"test:watch": "jest --watch",
121-
"test:e2e": "start-server-and-test \"tsc -p src/ElectronBackend && vite -m e2e\" http-get://localhost:5173/index.html \"yarn playwright test -c src/e2e-tests/playwright.config.ts\"",
121+
"test:e2e": "NODE_ENV=test start-server-and-test \"tsc -p src/ElectronBackend && vite -m e2e\" http-get://localhost:5173/index.html \"yarn playwright test -c src/e2e-tests/playwright.config.ts\"",
122122
"test:e2e:ci": "yarn playwright test -c src/e2e-tests/playwright.config.ts",
123123
"lint": "eslint --fix",
124124
"lint-check": "eslint",

src/ElectronBackend/opossum-file/convertScancodeToOpossum.ts

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const execFile = promisify(execFileCallback);
1111

1212
const OPOSSUM_FILE_EXECUTABLE = join(
1313
app?.getAppPath?.() ?? './',
14+
process.env.NODE_ENV === 'test' ? '../..' : '',
1415
'bin/opossum-file',
1516
);
1617

0 commit comments

Comments
 (0)