The previous jest-config fix let the module graph load further and exposed two more reasons the server e2e never passed since it was added: 1. ESM transform chain: AppModule pulls in editor-ext -> @tiptap -> @sindresorhus/slugify -> @sindresorhus/transliterate / escape-string-regexp, plus p-limit -> yocto-queue — all ESM-only. Extend the e2e transformIgnorePatterns whitelist to transform them (scoped packages need both the pnpm `@scope+name` and nested `@scope/name` path forms, hence `@sindresorhus[+/][a-z0-9-]+`). Verified locally: the graph now fully transforms and resolves. 2. Wrong HTTP adapter: Docmost runs on Fastify (main.ts uses FastifyAdapter) and does not depend on @nestjs/platform-express, but the scaffold test used the default createNestApplication() (Express) and died with "@nestjs/platform-express package is missing". Switch the test to FastifyAdapter + getInstance().ready(), close in afterEach. Verified locally: createNestApplication + app.init() now proceed to the live Redis/Postgres connection (the infra CI provides via services + migrations). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
19 lines
656 B
JSON
19 lines
656 B
JSON
{
|
|
"moduleFileExtensions": ["js", "json", "ts", "tsx"],
|
|
"rootDir": ".",
|
|
"testEnvironment": "node",
|
|
"testRegex": ".e2e-spec.ts$",
|
|
"transform": {
|
|
"^.+\\.(t|j)sx?$": "ts-jest"
|
|
},
|
|
"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"
|
|
}
|
|
}
|