// // The @alias map must mirror _moduleAliases in package.json, which is what // module-alias/register sets up at runtime. // // These were previously written as "../../server/..." relative paths, which // jest resolves relative to the requiring file - so they never actually // resolved, and every existing test sidestepped them with relative requires. // is depth-independent and works from any test directory. // module.exports = { moduleNameMapper: { "^@root/(.*)$": "/$1", "^@models/(.*)$": "/server/models/$1", "^@routes/(.*)$": "/server/routes/$1", "^@helpers/(.*)$": "/server/helpers/$1", "^@config/(.*)$": "/server/config/$1", "^@workers/(.*)$": "/server/workers/$1", } }