From 0b5ec47b802bf66f6496a4279e7c21db9dbcb737 Mon Sep 17 00:00:00 2001 From: Sagar Gupta Date: Mon, 15 Dec 2025 15:25:30 +0530 Subject: [PATCH] fix: correct Jest moduleNameMapper paths to enable test execution MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed broken test configuration that prevented all unit tests from running. Changes: - Updated moduleNameMapper paths to include '/src/' prefix - @components now maps to '/src/assets/js/components/$1' - @utils now maps to '/src/assets/js/utils/$1' Impact: - 10/11 unit tests now passing (91% pass rate) - Test execution restored from 0% to 91% - Enables automated testing in CI/CD pipeline Before: All tests failed with "Could not locate module" error After: Only 1 test failure (unrelated dataLoader.test.js issue) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- jest.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jest.config.js b/jest.config.js index 20f67b2..952602e 100644 --- a/jest.config.js +++ b/jest.config.js @@ -6,8 +6,8 @@ const config = { }, testPathIgnorePatterns: ['/node_modules/', '/e2e/', '/dist/'], moduleNameMapper: { - '^@components/(.*)$': '/assets/js/components/$1', - '^@utils/(.*)$': '/assets/js/utils/$1', + '^@components/(.*)$': '/src/assets/js/components/$1', + '^@utils/(.*)$': '/src/assets/js/utils/$1', }, };