From 3435608c6a3a20c348b0d22b458267f8e6ae46cb Mon Sep 17 00:00:00 2001 From: Alberto Diaz Date: Fri, 3 Sep 2021 17:29:15 +0200 Subject: [PATCH 1/2] Remove ts-jest warning when running tests * This simple fix removes the annoying warning displayed below: "ts-jest[config] (WARN) Unable to find the root of the project where ts-jest has been installed." Signed-off-by: Alberto Diaz --- frontend/jest.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/jest.config.js b/frontend/jest.config.js index 930078f..e9948cc 100644 --- a/frontend/jest.config.js +++ b/frontend/jest.config.js @@ -3,6 +3,7 @@ module.exports = { globals: { 'ts-jest': { tsconfig: '/tsconfig-test.json', + packageJson: 'package.json', }, API_URL: 'wss://api.url', }, From f815bf71fc450f4288bb8cff5cbf0085d62f4156 Mon Sep 17 00:00:00 2001 From: Alberto Diaz Date: Thu, 9 Sep 2021 16:29:58 +0200 Subject: [PATCH 2/2] Remove ts-jest warning when running tests * Simplify the "test" script, since the "npx" indirection is not needed here Signed-off-by: Alberto Diaz --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fb5924a..ed68d20 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "scripts": { "start": "cd frontend && vite", "preview": "npm run build:frontend && cd frontend && vite preview", - "test": "npx jest --config frontend/jest.config.js", + "test": "jest --config frontend/jest.config.js", "build": "run-p build:backend build:frontend", "lint": "prettier . --write", "prepare": "husky install",