149 lines
7.0 KiB
Plaintext
149 lines
7.0 KiB
Plaintext
|
|
> backend@1.5.1 test
|
|
> jest --forceExit
|
|
|
|
PASS src/app.controller.spec.ts
|
|
[Nest] 2908 - 12/09/2025, 8:31:31 AM ERROR [WorkflowDslParser] Failed to parse stored DSL for definition 1
|
|
[Nest] 2908 - 12/09/2025, 8:31:31 AM ERROR [WorkflowDslParser] ZodError: [
|
|
{
|
|
"expected": "object",
|
|
"code": "invalid_type",
|
|
"path": [],
|
|
"message": "Invalid input: expected object, received undefined"
|
|
}
|
|
]
|
|
at WorkflowDslParser.getParsedDsl (D:\nap-dms.lcbp3\backend\src\modules\workflow-engine\dsl\parser.service.ts:163:32)
|
|
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
at Object.<anonymous> (D:\nap-dms.lcbp3\backend\src\modules\workflow-engine\dsl\parser.service.spec.ts:178:22)
|
|
FAIL src/modules/workflow-engine/dsl/parser.service.spec.ts
|
|
● WorkflowDslParser › parse › should parse valid RFA workflow DSL
|
|
|
|
expect(received).toBe(expected) // Object.is equality
|
|
|
|
Expected: "RFA_APPROVAL"
|
|
Received: undefined
|
|
|
|
41 |
|
|
42 | expect(result).toBeDefined();
|
|
> 43 | expect(result.name).toBe('RFA_APPROVAL');
|
|
| ^
|
|
44 | expect(result.version).toBe('1.0.0');
|
|
45 | expect(result.isActive).toBe(true);
|
|
46 | expect(mockRepository.save).toHaveBeenCalled();
|
|
|
|
at Object.<anonymous> (modules/workflow-engine/dsl/parser.service.spec.ts:43:27)
|
|
|
|
● WorkflowDslParser › getParsedDsl › should retrieve and parse stored DSL
|
|
|
|
BadRequestException: Invalid stored DSL: [
|
|
{
|
|
"expected": "object",
|
|
"code": "invalid_type",
|
|
"path": [],
|
|
"message": "Invalid input: expected object, received undefined"
|
|
}
|
|
]
|
|
|
|
167 | error
|
|
168 | );
|
|
> 169 | throw new BadRequestException(`Invalid stored DSL: ${error?.message}`);
|
|
| ^
|
|
170 | }
|
|
171 | }
|
|
172 |
|
|
|
|
at WorkflowDslParser.getParsedDsl (modules/workflow-engine/dsl/parser.service.ts:169:13)
|
|
at Object.<anonymous> (modules/workflow-engine/dsl/parser.service.spec.ts:178:22)
|
|
|
|
PASS src/common/auth/casl/ability.factory.spec.ts
|
|
PASS src/common/auth/auth.service.spec.ts
|
|
ΓùÅ Console
|
|
|
|
console.log
|
|
🔍 Checking login for: testuser
|
|
|
|
at AuthService.validateUser (common/auth/auth.service.ts:43:13)
|
|
|
|
console.log
|
|
🔍 Checking login for: unknown
|
|
|
|
at AuthService.validateUser (common/auth/auth.service.ts:43:13)
|
|
|
|
console.log
|
|
❌ User not found in database
|
|
|
|
at AuthService.validateUser (common/auth/auth.service.ts:51:15)
|
|
|
|
console.log
|
|
🔍 Checking login for: testuser
|
|
|
|
at AuthService.validateUser (common/auth/auth.service.ts:43:13)
|
|
|
|
PASS src/modules/user/user.service.spec.ts
|
|
[Nest] 8380 - 12/09/2025, 8:31:32 AM ERROR [WorkflowEngineService] Transition Failed for inst-1: DB Error
|
|
PASS src/modules/workflow-engine/workflow-engine.service.spec.ts
|
|
PASS src/modules/project/project.service.spec.ts
|
|
[Nest] 7492 - 12/09/2025, 8:31:32 AM ERROR [FileStorageService] Failed to write file: D:\nap-dms.lcbp3\backend\uploads\temp\d95da96c-c9b6-4b11-9d67-9f4e19c76b8b.pdf
|
|
[Nest] 7492 - 12/09/2025, 8:31:32 AM ERROR [FileStorageService] Error: Write error
|
|
at Object.<anonymous> (D:\nap-dms.lcbp3\backend\src\common\file-storage\file-storage.service.spec.ts:90:9)
|
|
at Promise.finally.completed (D:\nap-dms.lcbp3\backend\node_modules\jest-circus\build\jestAdapterInit.js:1557:28)
|
|
at new Promise (<anonymous>)
|
|
at callAsyncCircusFn (D:\nap-dms.lcbp3\backend\node_modules\jest-circus\build\jestAdapterInit.js:1497:10)
|
|
at _callCircusTest (D:\nap-dms.lcbp3\backend\node_modules\jest-circus\build\jestAdapterInit.js:1007:40)
|
|
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
at _runTest (D:\nap-dms.lcbp3\backend\node_modules\jest-circus\build\jestAdapterInit.js:947:3)
|
|
at D:\nap-dms.lcbp3\backend\node_modules\jest-circus\build\jestAdapterInit.js:849:7
|
|
at _runTestsForDescribeBlock (D:\nap-dms.lcbp3\backend\node_modules\jest-circus\build\jestAdapterInit.js:862:11)
|
|
at _runTestsForDescribeBlock (D:\nap-dms.lcbp3\backend\node_modules\jest-circus\build\jestAdapterInit.js:857:11)
|
|
at _runTestsForDescribeBlock (D:\nap-dms.lcbp3\backend\node_modules\jest-circus\build\jestAdapterInit.js:857:11)
|
|
at run (D:\nap-dms.lcbp3\backend\node_modules\jest-circus\build\jestAdapterInit.js:761:3)
|
|
at runAndTransformResultsToJestFormat (D:\nap-dms.lcbp3\backend\node_modules\jest-circus\build\jestAdapterInit.js:1918:21)
|
|
at jestAdapter (D:\nap-dms.lcbp3\backend\node_modules\jest-circus\build\runner.js:101:19)
|
|
at runTestInternal (D:\nap-dms.lcbp3\backend\node_modules\jest-runner\build\testWorker.js:277:16)
|
|
at runTest (D:\nap-dms.lcbp3\backend\node_modules\jest-runner\build\testWorker.js:345:7)
|
|
at Object.worker (D:\nap-dms.lcbp3\backend\node_modules\jest-runner\build\testWorker.js:499:12)
|
|
PASS src/modules/json-schema/json-schema.controller.spec.ts
|
|
[Nest] 45732 - 12/09/2025, 8:31:32 AM ERROR [DocumentNumberingService] Error generating number for doc_num:1:1:1:2025
|
|
PASS src/common/file-storage/file-storage.service.spec.ts
|
|
[Nest] 45732 - 12/09/2025, 8:31:32 AM ERROR [DocumentNumberingService] InternalServerErrorException: Failed to generate document number after retries.
|
|
at DocumentNumberingService.generateNextNumber (D:\nap-dms.lcbp3\backend\src\modules\document-numbering\document-numbering.service.ts:182:13)
|
|
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
at Object.<anonymous> (D:\nap-dms.lcbp3\backend\src\modules\document-numbering\document-numbering.service.spec.ts:175:7) {
|
|
response: {
|
|
message: 'Failed to generate document number after retries.',
|
|
error: 'Internal Server Error',
|
|
statusCode: 500
|
|
},
|
|
status: 500,
|
|
options: {}
|
|
}
|
|
PASS src/modules/document-numbering/document-numbering.service.spec.ts
|
|
PASS src/modules/project/project.controller.spec.ts
|
|
PASS src/common/file-storage/file-storage.controller.spec.ts
|
|
FAIL src/modules/correspondence/correspondence.service.spec.ts
|
|
● CorrespondenceService › findAll › should return paginated correspondences
|
|
|
|
expect(received).toBeDefined()
|
|
|
|
Received: undefined
|
|
|
|
119 | it('should return paginated correspondences', async () => {
|
|
120 | const result = await service.findAll({ projectId: 1 });
|
|
> 121 | expect(result.data).toBeDefined();
|
|
| ^
|
|
122 | expect(result.meta).toBeDefined();
|
|
123 | });
|
|
124 | });
|
|
|
|
at Object.<anonymous> (modules/correspondence/correspondence.service.spec.ts:121:27)
|
|
|
|
PASS src/common/auth/auth.controller.spec.ts
|
|
PASS src/modules/correspondence/correspondence.controller.spec.ts (5.12 s)
|
|
|
|
Test Suites: 2 failed, 13 passed, 15 total
|
|
Tests: 3 failed, 63 passed, 66 total
|
|
Snapshots: 0 total
|
|
Time: 6.447 s
|
|
Ran all test suites.
|
|
Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished?
|