mirror of
https://github.com/nestjs/nest.git
synced 2026-10-28 09:45:43 +08:00
test: re-enable typeorm, mongoose and graphql schema-first suites (#17875)
- These suites failed with two copies of `ModuleRef` and `HttpAdapterHost`: the tests import `@nestjs/core` from its TypeScript sources, while the `@nestjs/*` packages in node_modules loaded the compiled build. - Inline `@nestjs/apollo`, `graphql`, `mongoose` and `typeorm` so their core imports resolve to the same sources, and remove the three exclusions. - Replace the outdated CommonJS note with the reason each remaining suite stays excluded.
This commit is contained in:
1 parent
1fbe1c5332
commit
3f56db32fc
1 file changed
+13
-8
@@ -50,18 +50,23 @@ export default defineConfig({
|
||||
include: ['integration/**/*.spec.ts'],
|
||||
exclude: [
|
||||
'**/node_modules/**',
|
||||
// Excluded until third-party @nestjs/* packages support ESM.
|
||||
// CJS require() of workspace packages causes a dual-package hazard
|
||||
// (different class instances for ModuleRef, etc.).
|
||||
'integration/mongoose/**',
|
||||
'integration/typeorm/**',
|
||||
// Two copies of `graphql` load: "Cannot use GraphQLSchema from another
|
||||
// module or realm".
|
||||
'integration/graphql-code-first/**',
|
||||
'integration/graphql-schema-first/**',
|
||||
// TODO: remove once these are ESM-compatible
|
||||
// Uses @nestjs/mapped-types (CJS) — same dual-package hazard
|
||||
// The serialized graph gains websocket entrypoints the fixture lacks.
|
||||
'integration/inspector/**',
|
||||
// `@nestjs/core/repl/native-functions` does not resolve under `exports`.
|
||||
'integration/repl/e2e/repl.spec.ts',
|
||||
],
|
||||
server: {
|
||||
deps: {
|
||||
// Transform the @nestjs/* packages that live in node_modules so their
|
||||
// `@nestjs/core` imports reach the same TypeScript sources as the
|
||||
// tests; loaded natively they get the compiled `.js`, a second copy
|
||||
// of every class (ModuleRef, HttpAdapterHost).
|
||||
inline: [/@nestjs\/(apollo|graphql|mongoose|typeorm)/],
|
||||
},
|
||||
},
|
||||
testTimeout: 30_000,
|
||||
hookTimeout: 30_000,
|
||||
setupFiles: ['reflect-metadata'],
|
||||
|
||||
Reference in new issue
Block a user