The e2e transform matches .js (required so ESM-only node_modules like nanoid/@sindresorhus get transpiled), which also sweeps in editor-ext's prebuilt CommonJS dist/*.js. ts-jest then warns "Got a .js file to compile while allowJs is not set to true" for each footnote file. The .js match cannot be dropped without reintroducing the ESM load errors, so enable allowJs for ts-jest via an inline tsconfig override (merged with apps/server/tsconfig.json — decorators/paths/module stay intact). Verified locally: 0 allowJs warnings, app still compiles and boots to the Redis connection (no DI/metadata regressions). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
19 lines
695 B
JSON
19 lines
695 B
JSON
{
|
|
"moduleFileExtensions": ["js", "json", "ts", "tsx"],
|
|
"rootDir": ".",
|
|
"testEnvironment": "node",
|
|
"testRegex": ".e2e-spec.ts$",
|
|
"transform": {
|
|
"^.+\\.(t|j)sx?$": ["ts-jest", { "tsconfig": { "allowJs": true } }]
|
|
},
|
|
"transformIgnorePatterns": [
|
|
"/node_modules/(?!(\\.pnpm/)?(nanoid|uuid|image-dimensions|marked|happy-dom|lib0|@sindresorhus[+/][a-z0-9-]+|escape-string-regexp|p-limit|yocto-queue)(@|/))"
|
|
],
|
|
"moduleNameMapper": {
|
|
"^@docmost/db/(.*)$": "<rootDir>/../src/database/$1",
|
|
"^@docmost/transactional/(.*)$": "<rootDir>/../src/integrations/transactional/$1",
|
|
"^@docmost/ee/(.*)$": "<rootDir>/../src/ee/$1",
|
|
"^src/(.*)$": "<rootDir>/../src/$1"
|
|
}
|
|
}
|