From b13273a22fae4a19b5ee0d4f919387719e6b3d71 Mon Sep 17 00:00:00 2001 From: Tomas Kikutis Date: Fri, 17 Jan 2025 10:45:16 +0100 Subject: [PATCH] fix unit tests not running --- webpack.config.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 75806ef6f1..5efb1f8f50 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -107,7 +107,10 @@ module.exports = function makeConfig(grunt) { * with a superdesk app open and superdesk-core not installed. * running `npm link superdesk-core` inside of a superdesk app fixes this. */ - 'superdesk-core': getModuleDir('superdesk-core'), + 'superdesk-core': + process.cwd() === __dirname + ? __dirname // when running unit tests from this project + : getModuleDir('superdesk-core'), }, extensions: ['.js', '.jsx', '.ts', '.tsx'], },