test-infra: re-enable 16 disabled server suites (jest DI + lib0 ESM) (#56)
16 suites were disabled via testPathIgnorePatterns due to two root causes: lib0 ESM not transformed (the @hocuspocus/server -> lib0/decoding.js chain) and stock 'should be defined' specs built via Test.createTestingModule without providers. Add lib0 to transformIgnorePatterns; convert the 14 DI placeholders to direct new X(...) instantiation with stub deps (keeping a real construct smoke test); re-enable the suites. Also updates the public-share limiter test to assert the fail-closed behavior from #62 (surfaced now that the suite runs). Full server suite: 67 passed, 689 tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -169,23 +169,7 @@
|
||||
"rootDir": "src",
|
||||
"testRegex": ".*\\.spec\\.ts$",
|
||||
"testPathIgnorePatterns": [
|
||||
"/node_modules/",
|
||||
"<rootDir>/core/auth/auth.controller.spec.ts",
|
||||
"<rootDir>/core/auth/services/auth.service.spec.ts",
|
||||
"<rootDir>/core/auth/services/token.service.spec.ts",
|
||||
"<rootDir>/core/comment/comment.service.spec.ts",
|
||||
"<rootDir>/core/group/group.controller.spec.ts",
|
||||
"<rootDir>/core/group/services/group.service.spec.ts",
|
||||
"<rootDir>/core/page/page.controller.spec.ts",
|
||||
"<rootDir>/core/page/services/page.service.spec.ts",
|
||||
"<rootDir>/core/search/search.controller.spec.ts",
|
||||
"<rootDir>/core/search/search.service.spec.ts",
|
||||
"<rootDir>/core/space/services/space.service.spec.ts",
|
||||
"<rootDir>/core/space/space.controller.spec.ts",
|
||||
"<rootDir>/core/user/user.controller.spec.ts",
|
||||
"<rootDir>/core/workspace/services/workspace.service.spec.ts",
|
||||
"<rootDir>/integrations/environment/environment.service.spec.ts",
|
||||
"<rootDir>/integrations/storage/storage.service.spec.ts"
|
||||
"/node_modules/"
|
||||
],
|
||||
"transform": {
|
||||
"happy-dom.+\\.js$": [
|
||||
@@ -206,7 +190,7 @@
|
||||
"^.+\\.(t|j)sx?$": "ts-jest"
|
||||
},
|
||||
"transformIgnorePatterns": [
|
||||
"/node_modules/(?!(\\.pnpm/)?(nanoid|uuid|image-dimensions|marked|happy-dom)(@|/))"
|
||||
"/node_modules/(?!(\\.pnpm/)?(nanoid|uuid|image-dimensions|marked|happy-dom|lib0)(@|/))"
|
||||
],
|
||||
"collectCoverageFrom": [
|
||||
"**/*.(t|j)s"
|
||||
|
||||
Reference in New Issue
Block a user