260323:0917 fix CI : Run Tests #01
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
*.txt
|
||||
npm-debug.log*
|
||||
pnpm-debug.log*
|
||||
yarn-debug.log*
|
||||
|
||||
Vendored
-3
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"editor.fontSize": 18
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
Top 20 files with "any" issues:
|
||||
29 - D:\nap-dms.lcbp3\backend\src\modules\correspondence\correspondence.service.spec.ts
|
||||
8 - D:\nap-dms.lcbp3\backend\src\modules\document-numbering\document-numbering.service.spec.ts
|
||||
8 - D:\nap-dms.lcbp3\backend\test\phase3-workflow.e2e-spec.ts
|
||||
5 - D:\nap-dms.lcbp3\backend\src\common\auth\auth.service.spec.ts
|
||||
3 - D:\nap-dms.lcbp3\backend\src\modules\json-schema\dto\create-json-schema.dto.ts
|
||||
2 - D:\nap-dms.lcbp3\backend\src\database\seeds\run-seed.ts
|
||||
2 - D:\nap-dms.lcbp3\backend\src\database\seeds\user.seed.ts
|
||||
2 - D:\nap-dms.lcbp3\backend\src\modules\json-schema\services\virtual-column.service.ts
|
||||
2 - D:\nap-dms.lcbp3\backend\src\modules\project\project.service.spec.ts
|
||||
2 - D:\nap-dms.lcbp3\backend\src\modules\workflow-engine\dsl\parser.service.ts
|
||||
2 - D:\nap-dms.lcbp3\backend\src\scripts\migrate-storage-v2.ts
|
||||
1 - D:\nap-dms.lcbp3\backend\src\common\interceptors\audit-log.interceptor.ts
|
||||
1 - D:\nap-dms.lcbp3\backend\src\modules\json-schema\dto\search-json-schema.dto.ts
|
||||
1 - D:\nap-dms.lcbp3\backend\src\modules\json-schema\json-schema.service.ts
|
||||
1 - D:\nap-dms.lcbp3\backend\src\modules\notification\dto\search-notification.dto.ts
|
||||
1 - D:\nap-dms.lcbp3\backend\src\modules\project\dto\search-project.dto.ts
|
||||
1 - D:\nap-dms.lcbp3\backend\src\modules\rfa\entities\rfa-workflow-template.entity.ts
|
||||
1 - D:\nap-dms.lcbp3\backend\src\modules\rfa\entities\rfa-workflow.entity.ts
|
||||
1 - D:\nap-dms.lcbp3\backend\src\modules\workflow-engine\dto\evaluate-workflow.dto.ts
|
||||
1 - D:\nap-dms.lcbp3\backend\src\modules\workflow-engine\entities\workflow-history.entity.ts
|
||||
@@ -1,72 +0,0 @@
|
||||
|
||||
> backend@1.5.1 build
|
||||
> nest build
|
||||
|
||||
documentation/template-playground/hbs-render.service.ts:1:28 - error TS2307: Cannot find module '@angular/core' or its corresponding type declarations.
|
||||
|
||||
1 import { Injectable } from '@angular/core';
|
||||
~~~~~~~~~~~~~~~
|
||||
documentation/template-playground/hbs-render.service.ts:175:42 - error TS18046: 'error' is of type 'unknown'.
|
||||
|
||||
175 <p><strong>Error:</strong> ${error.message}</p>
|
||||
~~~~~
|
||||
documentation/template-playground/main.ts:1:40 - error TS2307: Cannot find module '@angular/platform-browser-dynamic' or its corresponding type declarations.
|
||||
|
||||
1 import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
documentation/template-playground/main.ts:8:12 - error TS7006: Parameter 'err' implicitly has an 'any' type.
|
||||
|
||||
8 .catch(err => console.error('Error starting template playground:', err));
|
||||
~~~
|
||||
documentation/template-playground/template-editor.service.ts:1:28 - error TS2307: Cannot find module '@angular/core' or its corresponding type declarations.
|
||||
|
||||
1 import { Injectable } from '@angular/core';
|
||||
~~~~~~~~~~~~~~~
|
||||
documentation/template-playground/template-playground.component.ts:1:69 - error TS2307: Cannot find module '@angular/core' or its corresponding type declarations.
|
||||
|
||||
1 import { Component, OnInit, ViewChild, ElementRef, OnDestroy } from '@angular/core';
|
||||
~~~~~~~~~~~~~~~
|
||||
documentation/template-playground/template-playground.component.ts:2:28 - error TS2307: Cannot find module '@angular/common/http' or its corresponding type declarations.
|
||||
|
||||
2 import { HttpClient } from '@angular/common/http';
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
documentation/template-playground/template-playground.module.ts:1:26 - error TS2307: Cannot find module '@angular/core' or its corresponding type declarations.
|
||||
|
||||
1 import { NgModule } from '@angular/core';
|
||||
~~~~~~~~~~~~~~~
|
||||
documentation/template-playground/template-playground.module.ts:2:31 - error TS2307: Cannot find module '@angular/platform-browser' or its corresponding type declarations.
|
||||
|
||||
2 import { BrowserModule } from '@angular/platform-browser';
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
documentation/template-playground/template-playground.module.ts:3:30 - error TS2307: Cannot find module '@angular/common' or its corresponding type declarations.
|
||||
|
||||
3 import { CommonModule } from '@angular/common';
|
||||
~~~~~~~~~~~~~~~~~
|
||||
documentation/template-playground/template-playground.module.ts:4:29 - error TS2307: Cannot find module '@angular/forms' or its corresponding type declarations.
|
||||
|
||||
4 import { FormsModule } from '@angular/forms';
|
||||
~~~~~~~~~~~~~~~~
|
||||
documentation/template-playground/template-playground.module.ts:5:34 - error TS2307: Cannot find module '@angular/common/http' or its corresponding type declarations.
|
||||
|
||||
5 import { HttpClientModule } from '@angular/common/http';
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
documentation/template-playground/zip-export.service.ts:1:28 - error TS2307: Cannot find module '@angular/core' or its corresponding type declarations.
|
||||
|
||||
1 import { Injectable } from '@angular/core';
|
||||
~~~~~~~~~~~~~~~
|
||||
src/modules/rfa/rfa.service.ts:422:11 - error TS2339: Property 'returnToSequence' does not exist on type 'WorkflowActionDto'.
|
||||
|
||||
422 dto.returnToSequence
|
||||
~~~~~~~~~~~~~~~~
|
||||
src/modules/rfa/rfa.service.ts:435:37 - error TS2551: Property 'comments' does not exist on type 'WorkflowActionDto'. Did you mean 'comment'?
|
||||
|
||||
435 currentRouting.comments = dto.comments;
|
||||
~~~~~~~~
|
||||
|
||||
src/modules/correspondence/dto/workflow-action.dto.ts:29:3
|
||||
29 comment?: string;
|
||||
~~~~~~~
|
||||
'comment' is declared here.
|
||||
|
||||
Found 15 error(s).
|
||||
|
||||
@@ -1,141 +0,0 @@
|
||||
|
||||
> backend@1.5.1 build
|
||||
> nest build
|
||||
|
||||
src/modules/document-numbering/controllers/document-numbering.controller.ts:93:37 - error TS2551: Property 'originatorOrganizationId' does not exist on type 'PreviewNumberDto'. Did you mean 'recipientOrganizationId'?
|
||||
|
||||
93 originatorOrganizationId: dto.originatorOrganizationId,
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
src/modules/document-numbering/dto/preview-number.dto.ts:27:3
|
||||
27 recipientOrganizationId?: number;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
'recipientOrganizationId' is declared here.
|
||||
src/modules/document-numbering/controllers/document-numbering.controller.ts:94:19 - error TS2339: Property 'correspondenceTypeId' does not exist on type 'PreviewNumberDto'.
|
||||
|
||||
94 typeId: dto.correspondenceTypeId,
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
src/modules/document-numbering/controllers/document-numbering.controller.ts:100:25 - error TS2339: Property 'customTokens' does not exist on type 'PreviewNumberDto'.
|
||||
|
||||
100 customTokens: dto.customTokens,
|
||||
~~~~~~~~~~~~
|
||||
src/modules/document-numbering/dto/confirm-reservation.dto.ts:13:3 - error TS2564: Property 'documentNumber' has no initializer and is not definitely assigned in the constructor.
|
||||
|
||||
13 documentNumber: string;
|
||||
~~~~~~~~~~~~~~
|
||||
src/modules/document-numbering/dto/confirm-reservation.dto.ts:14:3 - error TS2564: Property 'confirmedAt' has no initializer and is not definitely assigned in the constructor.
|
||||
|
||||
14 confirmedAt: Date;
|
||||
~~~~~~~~~~~
|
||||
src/modules/document-numbering/dto/counter-key.dto.ts:2:3 - error TS2564: Property 'projectId' has no initializer and is not definitely assigned in the constructor.
|
||||
|
||||
2 projectId: number;
|
||||
~~~~~~~~~
|
||||
src/modules/document-numbering/dto/counter-key.dto.ts:3:3 - error TS2564: Property 'originatorOrganizationId' has no initializer and is not definitely assigned in the constructor.
|
||||
|
||||
3 originatorOrganizationId: number;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
src/modules/document-numbering/dto/counter-key.dto.ts:4:3 - error TS2564: Property 'recipientOrganizationId' has no initializer and is not definitely assigned in the constructor.
|
||||
|
||||
4 recipientOrganizationId: number;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
src/modules/document-numbering/dto/counter-key.dto.ts:5:3 - error TS2564: Property 'correspondenceTypeId' has no initializer and is not definitely assigned in the constructor.
|
||||
|
||||
5 correspondenceTypeId: number;
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
src/modules/document-numbering/dto/counter-key.dto.ts:6:3 - error TS2564: Property 'subTypeId' has no initializer and is not definitely assigned in the constructor.
|
||||
|
||||
6 subTypeId: number;
|
||||
~~~~~~~~~
|
||||
src/modules/document-numbering/dto/counter-key.dto.ts:7:3 - error TS2564: Property 'rfaTypeId' has no initializer and is not definitely assigned in the constructor.
|
||||
|
||||
7 rfaTypeId: number;
|
||||
~~~~~~~~~
|
||||
src/modules/document-numbering/dto/counter-key.dto.ts:8:3 - error TS2564: Property 'disciplineId' has no initializer and is not definitely assigned in the constructor.
|
||||
|
||||
8 disciplineId: number;
|
||||
~~~~~~~~~~~~
|
||||
src/modules/document-numbering/dto/counter-key.dto.ts:9:3 - error TS2564: Property 'resetScope' has no initializer and is not definitely assigned in the constructor.
|
||||
|
||||
9 resetScope: string;
|
||||
~~~~~~~~~~
|
||||
src/modules/document-numbering/dto/reserve-number.dto.ts:5:3 - error TS2564: Property 'projectId' has no initializer and is not definitely assigned in the constructor.
|
||||
|
||||
5 projectId: number;
|
||||
~~~~~~~~~
|
||||
src/modules/document-numbering/dto/reserve-number.dto.ts:8:3 - error TS2564: Property 'originatorOrganizationId' has no initializer and is not definitely assigned in the constructor.
|
||||
|
||||
8 originatorOrganizationId: number;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
src/modules/document-numbering/dto/reserve-number.dto.ts:15:3 - error TS2564: Property 'correspondenceTypeId' has no initializer and is not definitely assigned in the constructor.
|
||||
|
||||
15 correspondenceTypeId: number;
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
src/modules/document-numbering/dto/reserve-number.dto.ts:35:3 - error TS2564: Property 'token' has no initializer and is not definitely assigned in the constructor.
|
||||
|
||||
35 token: string;
|
||||
~~~~~
|
||||
src/modules/document-numbering/dto/reserve-number.dto.ts:36:3 - error TS2564: Property 'documentNumber' has no initializer and is not definitely assigned in the constructor.
|
||||
|
||||
36 documentNumber: string;
|
||||
~~~~~~~~~~~~~~
|
||||
src/modules/document-numbering/dto/reserve-number.dto.ts:37:3 - error TS2564: Property 'expiresAt' has no initializer and is not definitely assigned in the constructor.
|
||||
|
||||
37 expiresAt: Date;
|
||||
~~~~~~~~~
|
||||
src/modules/document-numbering/entities/document-number-format.entity.ts:20:3 - error TS2564: Property 'id' has no initializer and is not definitely assigned in the constructor.
|
||||
|
||||
20 id: number;
|
||||
~~
|
||||
src/modules/document-numbering/entities/document-number-format.entity.ts:23:3 - error TS2564: Property 'projectId' has no initializer and is not definitely assigned in the constructor.
|
||||
|
||||
23 projectId: number;
|
||||
~~~~~~~~~
|
||||
src/modules/document-numbering/entities/document-number-format.entity.ts:26:3 - error TS2564: Property 'correspondenceTypeId' has no initializer and is not definitely assigned in the constructor.
|
||||
|
||||
26 correspondenceTypeId: number | null;
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
src/modules/document-numbering/entities/document-number-format.entity.ts:29:3 - error TS2564: Property 'formatTemplate' has no initializer and is not definitely assigned in the constructor.
|
||||
|
||||
29 formatTemplate: string;
|
||||
~~~~~~~~~~~~~~
|
||||
src/modules/document-numbering/entities/document-number-format.entity.ts:32:3 - error TS2564: Property 'description' has no initializer and is not definitely assigned in the constructor.
|
||||
|
||||
32 description: string;
|
||||
~~~~~~~~~~~
|
||||
src/modules/document-numbering/entities/document-number-format.entity.ts:36:3 - error TS2564: Property 'resetSequenceYearly' has no initializer and is not definitely assigned in the constructor.
|
||||
|
||||
36 resetSequenceYearly: boolean;
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
src/modules/document-numbering/entities/document-number-format.entity.ts:39:3 - error TS2564: Property 'createdAt' has no initializer and is not definitely assigned in the constructor.
|
||||
|
||||
39 createdAt: Date;
|
||||
~~~~~~~~~
|
||||
src/modules/document-numbering/entities/document-number-format.entity.ts:42:3 - error TS2564: Property 'updatedAt' has no initializer and is not definitely assigned in the constructor.
|
||||
|
||||
42 updatedAt: Date;
|
||||
~~~~~~~~~
|
||||
src/modules/document-numbering/entities/document-number-format.entity.ts:47:3 - error TS2564: Property 'project' has no initializer and is not definitely assigned in the constructor.
|
||||
|
||||
47 project: Project;
|
||||
~~~~~~~
|
||||
src/modules/document-numbering/entities/document-number-format.entity.ts:51:3 - error TS2564: Property 'correspondenceType' has no initializer and is not definitely assigned in the constructor.
|
||||
|
||||
51 correspondenceType: CorrespondenceType | null;
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
src/modules/document-numbering/services/document-numbering.service.ts:249:5 - error TS2740: Type 'DocumentNumberAudit[]' is missing the following properties from type 'DocumentNumberAudit': id, documentId, generatedNumber, counterKey, and 5 more.
|
||||
|
||||
249 return await this.auditRepo.save(audit);
|
||||
~~~~~~
|
||||
src/modules/document-numbering/services/document-numbering.service.ts:256:11 - error TS2769: No overload matches this call.
|
||||
Overload 1 of 3, '(entityLikeArray: DeepPartial<DocumentNumberError>[]): DocumentNumberError[]', gave the following error.
|
||||
Object literal may only specify known properties, and 'projectId' does not exist in type 'DeepPartial<DocumentNumberError>[]'.
|
||||
Overload 2 of 3, '(entityLike: DeepPartial<DocumentNumberError>): DocumentNumberError', gave the following error.
|
||||
Object literal may only specify known properties, and 'projectId' does not exist in type 'DeepPartial<DocumentNumberError>'.
|
||||
|
||||
256 projectId: ctx.projectId,
|
||||
~~~~~~~~~
|
||||
|
||||
|
||||
Found 31 error(s).
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,421 +0,0 @@
|
||||
|
||||
> backend@1.5.1 test:e2e
|
||||
> jest --config ./test/jest-e2e.json
|
||||
|
||||
[Nest] 13440 - 12/09/2025, 8:34:55 AM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (1)...
|
||||
AggregateError:
|
||||
at internalConnectMultiple (node:net:1134:18)
|
||||
at afterConnectMultiple (node:net:1715:7)
|
||||
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17)
|
||||
[Nest] 12240 - 12/09/2025, 8:34:55 AM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (1)...
|
||||
AggregateError:
|
||||
at internalConnectMultiple (node:net:1134:18)
|
||||
at afterConnectMultiple (node:net:1715:7)
|
||||
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17)
|
||||
[Nest] 41780 - 12/09/2025, 8:34:55 AM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (1)...
|
||||
AggregateError:
|
||||
at internalConnectMultiple (node:net:1134:18)
|
||||
at afterConnectMultiple (node:net:1715:7)
|
||||
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17)
|
||||
|
||||
ΓùÅ Cannot log after tests are done. Did you forget to wait for something async in your test?
|
||||
Attempted to log "AggregateError:
|
||||
at internalConnectMultiple (node:net:1134:18)
|
||||
at afterConnectMultiple (node:net:1715:7)
|
||||
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
code: 'ECONNREFUSED',
|
||||
[errors]: [
|
||||
Error: connect ECONNREFUSED ::1:6379
|
||||
at createConnectionError (node:net:1678:14)
|
||||
at afterConnectMultiple (node:net:1708:16)
|
||||
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
errno: -4078,
|
||||
code: 'ECONNREFUSED',
|
||||
syscall: 'connect',
|
||||
address: '::1',
|
||||
port: 6379
|
||||
},
|
||||
Error: connect ECONNREFUSED 127.0.0.1:6379
|
||||
at createConnectionError (node:net:1678:14)
|
||||
at afterConnectMultiple (node:net:1708:16)
|
||||
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
errno: -4078,
|
||||
code: 'ECONNREFUSED',
|
||||
syscall: 'connect',
|
||||
address: '127.0.0.1',
|
||||
port: 6379
|
||||
}
|
||||
]
|
||||
}".
|
||||
|
||||
at TCPConnectWrap.callbackTrampoline (../node:internal/async_hooks:130:17) {
|
||||
code: 'ECONNREFUSED',
|
||||
[errors]: [
|
||||
Error: connect ECONNREFUSED ::1:6379
|
||||
at TCPConnectWrap.callbackTrampoline (../node:internal/async_hooks:130:17) {
|
||||
errno: -4078,
|
||||
code: 'ECONNREFUSED',
|
||||
syscall: 'connect',
|
||||
address: '::1',
|
||||
port: 6379
|
||||
},
|
||||
Error: connect ECONNREFUSED 127.0.0.1:6379
|
||||
at TCPConnectWrap.callbackTrampoline (../node:internal/async_hooks:130:17) {
|
||||
errno: -4078,
|
||||
code: 'ECONNREFUSED',
|
||||
syscall: 'connect',
|
||||
address: '127.0.0.1',
|
||||
port: 6379
|
||||
}
|
||||
]
|
||||
}".
|
||||
at console.error (../node_modules/@jest/console/build/index.js:124:10)
|
||||
at Queue.emit (../../node_modules/.pnpm/bullmq@5.65.0/node_modules/bullmq/src/classes/queue-base.ts:129:17)
|
||||
at Queue.emit (../../node_modules/.pnpm/bullmq@5.65.0/node_modules/bullmq/src/classes/queue.ts:192:18)
|
||||
at RedisConnection.<anonymous> (../../node_modules/.pnpm/bullmq@5.65.0/node_modules/bullmq/src/classes/queue-base.ts:75:56)
|
||||
at EventEmitter.RedisConnection.handleClientError (../../node_modules/.pnpm/bullmq@5.65.0/node_modules/bullmq/src/classes/redis-connection.ts:121:12)
|
||||
at EventEmitter.silentEmit (../../node_modules/.pnpm/ioredis@5.8.2/node_modules/ioredis/built/Redis.js:484:30)
|
||||
at Socket.<anonymous> (../../node_modules/.pnpm/ioredis@5.8.2/node_modules/ioredis/built/redis/event_handler.js:221:14)
|
||||
|
||||
FAIL test/app.e2e-spec.ts (7.608 s)
|
||||
ΓùÅ Console
|
||||
|
||||
console.error
|
||||
Redis Connection Error: AggregateError:
|
||||
at internalConnectMultiple (node:net:1134:18)
|
||||
at afterConnectMultiple (node:net:1715:7)
|
||||
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
code: 'ECONNREFUSED',
|
||||
[errors]: [
|
||||
Error: connect ECONNREFUSED ::1:6379
|
||||
at createConnectionError (node:net:1678:14)
|
||||
at afterConnectMultiple (node:net:1708:16)
|
||||
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
errno: -4078,
|
||||
code: 'ECONNREFUSED',
|
||||
syscall: 'connect',
|
||||
address: '::1',
|
||||
port: 6379
|
||||
},
|
||||
Error: connect ECONNREFUSED 127.0.0.1:6379
|
||||
at createConnectionError (node:net:1678:14)
|
||||
at afterConnectMultiple (node:net:1708:16)
|
||||
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
errno: -4078,
|
||||
code: 'ECONNREFUSED',
|
||||
syscall: 'connect',
|
||||
address: '127.0.0.1',
|
||||
port: 6379
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
72 | imports: [ConfigModule],
|
||||
73 | useFactory: async (configService: ConfigService) => ({
|
||||
> 74 | store: await redisStore({
|
||||
| ^
|
||||
75 | socket: {
|
||||
76 | host: configService.get<string>('redis.host'),
|
||||
77 | port: configService.get<number>('redis.port'),
|
||||
|
||||
at redisStore (../../node_modules/.pnpm/cache-manager-redis-yet@5.1.5/node_modules/cache-manager-redis-yet/dist/index.js:101:17)
|
||||
at InstanceWrapper.useFactory [as metatype] (../src/app.module.ts:74:16)
|
||||
at TestingInjector.instantiateClass (../../node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs_89e063bd3a6d5071b082cab065bf34d7/node_modules/@nestjs/core/injector/injector.js:424:37)
|
||||
at callback (../../node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs_89e063bd3a6d5071b082cab065bf34d7/node_modules/@nestjs/core/injector/injector.js:70:34)
|
||||
at TestingInjector.resolveConstructorParams (../../node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs_89e063bd3a6d5071b082cab065bf34d7/node_modules/@nestjs/core/injector/injector.js:170:24)
|
||||
at TestingInjector.loadInstance (../../node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs_89e063bd3a6d5071b082cab065bf34d7/node_modules/@nestjs/core/injector/injector.js:75:13)
|
||||
at TestingInjector.loadProvider (../../node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs_89e063bd3a6d5071b082cab065bf34d7/node_modules/@nestjs/core/injector/injector.js:103:9)
|
||||
at ../../node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs_89e063bd3a6d5071b082cab065bf34d7/node_modules/@nestjs/core/injector/instance-loader.js:56:13
|
||||
at async Promise.all (index 5)
|
||||
at TestingInstanceLoader.createInstancesOfProviders (../../node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs_89e063bd3a6d5071b082cab065bf34d7/node_modules/@nestjs/core/injector/instance-loader.js:55:9)
|
||||
at ../../node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs_89e063bd3a6d5071b082cab065bf34d7/node_modules/@nestjs/core/injector/instance-loader.js:40:13
|
||||
at async Promise.all (index 6)
|
||||
at TestingInstanceLoader.createInstances (../../node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs_89e063bd3a6d5071b082cab065bf34d7/node_modules/@nestjs/core/injector/instance-loader.js:39:9)
|
||||
at TestingInstanceLoader.createInstancesOfDependencies (../../node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs_89e063bd3a6d5071b082cab065bf34d7/node_modules/@nestjs/core/injector/instance-loader.js:22:13)
|
||||
at TestingInstanceLoader.createInstancesOfDependencies (../../node_modules/.pnpm/@nestjs+testing@11.1.9_@nes_5fa0f54bf7d8c8acec998f5e81836857/node_modules/@nestjs/testing/testing-instance-loader.js:9:9)
|
||||
at TestingModuleBuilder.createInstancesOfDependencies (../../node_modules/.pnpm/@nestjs+testing@11.1.9_@nes_5fa0f54bf7d8c8acec998f5e81836857/node_modules/@nestjs/testing/testing-module.builder.js:118:9)
|
||||
at TestingModuleBuilder.compile (../../node_modules/.pnpm/@nestjs+testing@11.1.9_@nes_5fa0f54bf7d8c8acec998f5e81836857/node_modules/@nestjs/testing/testing-module.builder.js:74:9)
|
||||
at Object.<anonymous> (app.e2e-spec.ts:11:42)
|
||||
|
||||
● AppController (e2e) › / (GET)
|
||||
|
||||
AggregateError:
|
||||
|
||||
|
||||
|
||||
ΓùÅ Cannot log after tests are done. Did you forget to wait for something async in your test?
|
||||
Attempted to log "AggregateError:
|
||||
at internalConnectMultiple (node:net:1134:18)
|
||||
at afterConnectMultiple (node:net:1715:7)
|
||||
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
code: 'ECONNREFUSED',
|
||||
[errors]: [
|
||||
Error: connect ECONNREFUSED ::1:6379
|
||||
at createConnectionError (node:net:1678:14)
|
||||
at afterConnectMultiple (node:net:1708:16)
|
||||
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
errno: -4078,
|
||||
code: 'ECONNREFUSED',
|
||||
syscall: 'connect',
|
||||
address: '::1',
|
||||
port: 6379
|
||||
},
|
||||
Error: connect ECONNREFUSED 127.0.0.1:6379
|
||||
at createConnectionError (node:net:1678:14)
|
||||
at afterConnectMultiple (node:net:1708:16)
|
||||
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
errno: -4078,
|
||||
code: 'ECONNREFUSED',
|
||||
syscall: 'connect',
|
||||
address: '127.0.0.1',
|
||||
port: 6379
|
||||
}
|
||||
]
|
||||
}".
|
||||
|
||||
at TCPConnectWrap.callbackTrampoline (../node:internal/async_hooks:130:17) {
|
||||
code: 'ECONNREFUSED',
|
||||
[errors]: [
|
||||
Error: connect ECONNREFUSED ::1:6379
|
||||
at TCPConnectWrap.callbackTrampoline (../node:internal/async_hooks:130:17) {
|
||||
errno: -4078,
|
||||
code: 'ECONNREFUSED',
|
||||
syscall: 'connect',
|
||||
address: '::1',
|
||||
port: 6379
|
||||
},
|
||||
Error: connect ECONNREFUSED 127.0.0.1:6379
|
||||
at TCPConnectWrap.callbackTrampoline (../node:internal/async_hooks:130:17) {
|
||||
errno: -4078,
|
||||
code: 'ECONNREFUSED',
|
||||
syscall: 'connect',
|
||||
address: '127.0.0.1',
|
||||
port: 6379
|
||||
}
|
||||
]
|
||||
}".
|
||||
at console.error (../node_modules/@jest/console/build/index.js:124:10)
|
||||
at Queue.emit (../../node_modules/.pnpm/bullmq@5.65.0/node_modules/bullmq/src/classes/queue-base.ts:129:17)
|
||||
at Queue.emit (../../node_modules/.pnpm/bullmq@5.65.0/node_modules/bullmq/src/classes/queue.ts:192:18)
|
||||
at RedisConnection.<anonymous> (../../node_modules/.pnpm/bullmq@5.65.0/node_modules/bullmq/src/classes/queue-base.ts:75:56)
|
||||
at EventEmitter.RedisConnection.handleClientError (../../node_modules/.pnpm/bullmq@5.65.0/node_modules/bullmq/src/classes/redis-connection.ts:121:12)
|
||||
at EventEmitter.silentEmit (../../node_modules/.pnpm/ioredis@5.8.2/node_modules/ioredis/built/Redis.js:484:30)
|
||||
at Socket.<anonymous> (../../node_modules/.pnpm/ioredis@5.8.2/node_modules/ioredis/built/redis/event_handler.js:221:14)
|
||||
|
||||
FAIL test/simple.e2e-spec.ts (7.616 s)
|
||||
ΓùÅ Console
|
||||
|
||||
console.error
|
||||
Redis Connection Error: AggregateError:
|
||||
at internalConnectMultiple (node:net:1134:18)
|
||||
at afterConnectMultiple (node:net:1715:7)
|
||||
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
code: 'ECONNREFUSED',
|
||||
[errors]: [
|
||||
Error: connect ECONNREFUSED ::1:6379
|
||||
at createConnectionError (node:net:1678:14)
|
||||
at afterConnectMultiple (node:net:1708:16)
|
||||
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
errno: -4078,
|
||||
code: 'ECONNREFUSED',
|
||||
syscall: 'connect',
|
||||
address: '::1',
|
||||
port: 6379
|
||||
},
|
||||
Error: connect ECONNREFUSED 127.0.0.1:6379
|
||||
at createConnectionError (node:net:1678:14)
|
||||
at afterConnectMultiple (node:net:1708:16)
|
||||
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
errno: -4078,
|
||||
code: 'ECONNREFUSED',
|
||||
syscall: 'connect',
|
||||
address: '127.0.0.1',
|
||||
port: 6379
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
72 | imports: [ConfigModule],
|
||||
73 | useFactory: async (configService: ConfigService) => ({
|
||||
> 74 | store: await redisStore({
|
||||
| ^
|
||||
75 | socket: {
|
||||
76 | host: configService.get<string>('redis.host'),
|
||||
77 | port: configService.get<number>('redis.port'),
|
||||
|
||||
at redisStore (../../node_modules/.pnpm/cache-manager-redis-yet@5.1.5/node_modules/cache-manager-redis-yet/dist/index.js:101:17)
|
||||
at InstanceWrapper.useFactory [as metatype] (../src/app.module.ts:74:16)
|
||||
at TestingInjector.instantiateClass (../../node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs_89e063bd3a6d5071b082cab065bf34d7/node_modules/@nestjs/core/injector/injector.js:424:37)
|
||||
at callback (../../node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs_89e063bd3a6d5071b082cab065bf34d7/node_modules/@nestjs/core/injector/injector.js:70:34)
|
||||
at TestingInjector.resolveConstructorParams (../../node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs_89e063bd3a6d5071b082cab065bf34d7/node_modules/@nestjs/core/injector/injector.js:170:24)
|
||||
at TestingInjector.loadInstance (../../node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs_89e063bd3a6d5071b082cab065bf34d7/node_modules/@nestjs/core/injector/injector.js:75:13)
|
||||
at TestingInjector.loadProvider (../../node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs_89e063bd3a6d5071b082cab065bf34d7/node_modules/@nestjs/core/injector/injector.js:103:9)
|
||||
at ../../node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs_89e063bd3a6d5071b082cab065bf34d7/node_modules/@nestjs/core/injector/instance-loader.js:56:13
|
||||
at async Promise.all (index 5)
|
||||
at TestingInstanceLoader.createInstancesOfProviders (../../node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs_89e063bd3a6d5071b082cab065bf34d7/node_modules/@nestjs/core/injector/instance-loader.js:55:9)
|
||||
at ../../node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs_89e063bd3a6d5071b082cab065bf34d7/node_modules/@nestjs/core/injector/instance-loader.js:40:13
|
||||
at async Promise.all (index 6)
|
||||
at TestingInstanceLoader.createInstances (../../node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs_89e063bd3a6d5071b082cab065bf34d7/node_modules/@nestjs/core/injector/instance-loader.js:39:9)
|
||||
at TestingInstanceLoader.createInstancesOfDependencies (../../node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs_89e063bd3a6d5071b082cab065bf34d7/node_modules/@nestjs/core/injector/instance-loader.js:22:13)
|
||||
at TestingInstanceLoader.createInstancesOfDependencies (../../node_modules/.pnpm/@nestjs+testing@11.1.9_@nes_5fa0f54bf7d8c8acec998f5e81836857/node_modules/@nestjs/testing/testing-instance-loader.js:9:9)
|
||||
at TestingModuleBuilder.createInstancesOfDependencies (../../node_modules/.pnpm/@nestjs+testing@11.1.9_@nes_5fa0f54bf7d8c8acec998f5e81836857/node_modules/@nestjs/testing/testing-module.builder.js:118:9)
|
||||
at TestingModuleBuilder.compile (../../node_modules/.pnpm/@nestjs+testing@11.1.9_@nes_5fa0f54bf7d8c8acec998f5e81836857/node_modules/@nestjs/testing/testing-module.builder.js:74:9)
|
||||
at Object.<anonymous> (simple.e2e-spec.ts:9:42)
|
||||
|
||||
● Simple Test › should pass
|
||||
|
||||
AggregateError:
|
||||
|
||||
|
||||
|
||||
ΓùÅ Cannot log after tests are done. Did you forget to wait for something async in your test?
|
||||
Attempted to log "AggregateError:
|
||||
at internalConnectMultiple (node:net:1134:18)
|
||||
at afterConnectMultiple (node:net:1715:7)
|
||||
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
code: 'ECONNREFUSED',
|
||||
[errors]: [
|
||||
Error: connect ECONNREFUSED ::1:6379
|
||||
at createConnectionError (node:net:1678:14)
|
||||
at afterConnectMultiple (node:net:1708:16) {
|
||||
errno: -4078,
|
||||
code: 'ECONNREFUSED',
|
||||
syscall: 'connect',
|
||||
address: '::1',
|
||||
port: 6379
|
||||
},
|
||||
Error: connect ECONNREFUSED 127.0.0.1:6379
|
||||
at createConnectionError (node:net:1678:14)
|
||||
at afterConnectMultiple (node:net:1708:16)
|
||||
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
errno: -4078,
|
||||
code: 'ECONNREFUSED',
|
||||
syscall: 'connect',
|
||||
address: '127.0.0.1',
|
||||
port: 6379
|
||||
}
|
||||
]
|
||||
}".
|
||||
|
||||
at TCPConnectWrap.callbackTrampoline (../node:internal/async_hooks:130:17) {
|
||||
code: 'ECONNREFUSED',
|
||||
[errors]: [
|
||||
Error: connect ECONNREFUSED ::1:6379
|
||||
at afterConnectMultiple (../node:net:1708:16) {
|
||||
errno: -4078,
|
||||
code: 'ECONNREFUSED',
|
||||
syscall: 'connect',
|
||||
address: '::1',
|
||||
port: 6379
|
||||
},
|
||||
Error: connect ECONNREFUSED 127.0.0.1:6379
|
||||
at TCPConnectWrap.callbackTrampoline (../node:internal/async_hooks:130:17) {
|
||||
errno: -4078,
|
||||
code: 'ECONNREFUSED',
|
||||
syscall: 'connect',
|
||||
address: '127.0.0.1',
|
||||
port: 6379
|
||||
}
|
||||
]
|
||||
}".
|
||||
at console.error (../node_modules/@jest/console/build/index.js:124:10)
|
||||
at Queue.emit (../../node_modules/.pnpm/bullmq@5.65.0/node_modules/bullmq/src/classes/queue-base.ts:129:17)
|
||||
at Queue.emit (../../node_modules/.pnpm/bullmq@5.65.0/node_modules/bullmq/src/classes/queue.ts:192:18)
|
||||
at RedisConnection.<anonymous> (../../node_modules/.pnpm/bullmq@5.65.0/node_modules/bullmq/src/classes/queue-base.ts:75:56)
|
||||
at EventEmitter.RedisConnection.handleClientError (../../node_modules/.pnpm/bullmq@5.65.0/node_modules/bullmq/src/classes/redis-connection.ts:121:12)
|
||||
at EventEmitter.silentEmit (../../node_modules/.pnpm/ioredis@5.8.2/node_modules/ioredis/built/Redis.js:484:30)
|
||||
at Socket.<anonymous> (../../node_modules/.pnpm/ioredis@5.8.2/node_modules/ioredis/built/redis/event_handler.js:221:14)
|
||||
|
||||
FAIL test/phase3-workflow.e2e-spec.ts (7.637 s)
|
||||
ΓùÅ Console
|
||||
|
||||
console.error
|
||||
Redis Connection Error: AggregateError:
|
||||
at internalConnectMultiple (node:net:1134:18)
|
||||
at afterConnectMultiple (node:net:1715:7) {
|
||||
code: 'ECONNREFUSED',
|
||||
[errors]: [
|
||||
Error: connect ECONNREFUSED ::1:6379
|
||||
at createConnectionError (node:net:1678:14)
|
||||
at afterConnectMultiple (node:net:1708:16) {
|
||||
errno: -4078,
|
||||
code: 'ECONNREFUSED',
|
||||
syscall: 'connect',
|
||||
address: '::1',
|
||||
port: 6379
|
||||
},
|
||||
Error: connect ECONNREFUSED 127.0.0.1:6379
|
||||
at createConnectionError (node:net:1678:14)
|
||||
at afterConnectMultiple (node:net:1708:16) {
|
||||
errno: -4078,
|
||||
code: 'ECONNREFUSED',
|
||||
syscall: 'connect',
|
||||
address: '127.0.0.1',
|
||||
port: 6379
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
72 | imports: [ConfigModule],
|
||||
73 | useFactory: async (configService: ConfigService) => ({
|
||||
> 74 | store: await redisStore({
|
||||
| ^
|
||||
75 | socket: {
|
||||
76 | host: configService.get<string>('redis.host'),
|
||||
77 | port: configService.get<number>('redis.port'),
|
||||
|
||||
at redisStore (../../node_modules/.pnpm/cache-manager-redis-yet@5.1.5/node_modules/cache-manager-redis-yet/dist/index.js:101:17)
|
||||
at InstanceWrapper.useFactory [as metatype] (../src/app.module.ts:74:16)
|
||||
at TestingInjector.instantiateClass (../../node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs_89e063bd3a6d5071b082cab065bf34d7/node_modules/@nestjs/core/injector/injector.js:424:37)
|
||||
at callback (../../node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs_89e063bd3a6d5071b082cab065bf34d7/node_modules/@nestjs/core/injector/injector.js:70:34)
|
||||
at TestingInjector.resolveConstructorParams (../../node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs_89e063bd3a6d5071b082cab065bf34d7/node_modules/@nestjs/core/injector/injector.js:170:24)
|
||||
at TestingInjector.loadInstance (../../node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs_89e063bd3a6d5071b082cab065bf34d7/node_modules/@nestjs/core/injector/injector.js:75:13)
|
||||
at TestingInjector.loadProvider (../../node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs_89e063bd3a6d5071b082cab065bf34d7/node_modules/@nestjs/core/injector/injector.js:103:9)
|
||||
at ../../node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs_89e063bd3a6d5071b082cab065bf34d7/node_modules/@nestjs/core/injector/instance-loader.js:56:13
|
||||
at async Promise.all (index 5)
|
||||
at TestingInstanceLoader.createInstancesOfProviders (../../node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs_89e063bd3a6d5071b082cab065bf34d7/node_modules/@nestjs/core/injector/instance-loader.js:55:9)
|
||||
at ../../node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs_89e063bd3a6d5071b082cab065bf34d7/node_modules/@nestjs/core/injector/instance-loader.js:40:13
|
||||
at async Promise.all (index 6)
|
||||
at TestingInstanceLoader.createInstances (../../node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs_89e063bd3a6d5071b082cab065bf34d7/node_modules/@nestjs/core/injector/instance-loader.js:39:9)
|
||||
at TestingInstanceLoader.createInstancesOfDependencies (../../node_modules/.pnpm/@nestjs+core@11.1.9_@nestjs_89e063bd3a6d5071b082cab065bf34d7/node_modules/@nestjs/core/injector/instance-loader.js:22:13)
|
||||
at TestingInstanceLoader.createInstancesOfDependencies (../../node_modules/.pnpm/@nestjs+testing@11.1.9_@nes_5fa0f54bf7d8c8acec998f5e81836857/node_modules/@nestjs/testing/testing-instance-loader.js:9:9)
|
||||
at TestingModuleBuilder.createInstancesOfDependencies (../../node_modules/.pnpm/@nestjs+testing@11.1.9_@nes_5fa0f54bf7d8c8acec998f5e81836857/node_modules/@nestjs/testing/testing-module.builder.js:118:9)
|
||||
at TestingModuleBuilder.compile (../../node_modules/.pnpm/@nestjs+testing@11.1.9_@nes_5fa0f54bf7d8c8acec998f5e81836857/node_modules/@nestjs/testing/testing-module.builder.js:74:9)
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:25:42)
|
||||
|
||||
● Phase 3 Workflow (E2E) › /correspondences (POST) - Create Document
|
||||
|
||||
AggregateError:
|
||||
|
||||
|
||||
● Phase 3 Workflow (E2E) › /correspondences/:id/submit (POST) - Submit Workflow
|
||||
|
||||
AggregateError:
|
||||
|
||||
|
||||
● Phase 3 Workflow (E2E) › /correspondences/:id/workflow/action (POST) - Approve Step
|
||||
|
||||
AggregateError:
|
||||
|
||||
|
||||
|
||||
ΓùÅ Test suite failed to run
|
||||
|
||||
TypeError: Cannot read properties of undefined (reading 'close')
|
||||
|
||||
70 | // Correspondence cleanup might be needed if not using a test DB
|
||||
71 | }
|
||||
> 72 | await app.close();
|
||||
| ^
|
||||
73 | });
|
||||
74 |
|
||||
75 | it('/correspondences (POST) - Create Document', async () => {
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:72:15)
|
||||
|
||||
A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find leaks. Active timers can also cause this, ensure that .unref() was called on them.
|
||||
Test Suites: 3 failed, 3 total
|
||||
Tests: 5 failed, 5 total
|
||||
Snapshots: 0 total
|
||||
Time: 8.87 s
|
||||
Ran all test suites.
|
||||
@@ -1,109 +0,0 @@
|
||||
|
||||
> backend@1.5.1 test:e2e D:\nap-dms.lcbp3\backend
|
||||
> jest --config ./test/jest-e2e.json
|
||||
|
||||
PASS test/simple.e2e-spec.ts
|
||||
PASS test/app.e2e-spec.ts
|
||||
[Nest] 5332 - 12/09/2025, 11:25:20 AM ERROR [DocumentNumberingService] Failed to log audit
|
||||
[Nest] 5332 - 12/09/2025, 11:25:21 AM ERROR [DocumentNumberingService] QueryFailedError: Unknown column 'generated_at' in 'RETURNING'
|
||||
at Query.onResult (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\driver\mysql\MysqlQueryRunner.ts:248:33)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:36:14)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
query: 'INSERT INTO `document_number_audit`(`id`, `generated_number`, `counter_key`, `template_used`, `sequence_number`, `user_id`, `ip_address`, `retry_count`, `lock_wait_ms`, `generated_at`) VALUES (DEFAULT, ?, ?, ?, ?, DEFAULT, DEFAULT, ?, ?, DEFAULT) RETURNING `id`, `retry_count`, `generated_at`',
|
||||
parameters: [
|
||||
'ผรม.1-ผรม.1-0003-2568',
|
||||
'doc_num:1:1:0:2025',
|
||||
'{ORG}-{ORG}-{SEQ:4}-{YEAR}',
|
||||
3,
|
||||
0,
|
||||
0
|
||||
],
|
||||
driverError: Error: Unknown column 'generated_at' in 'RETURNING'
|
||||
at Packet.asError (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packets\packet.js:740:17)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:29:26)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
code: 'ER_BAD_FIELD_ERROR',
|
||||
errno: 1054,
|
||||
sqlState: '42S22',
|
||||
sqlMessage: "Unknown column 'generated_at' in 'RETURNING'",
|
||||
sql: "INSERT INTO `document_number_audit`(`id`, `generated_number`, `counter_key`, `template_used`, `sequence_number`, `user_id`, `ip_address`, `retry_count`, `lock_wait_ms`, `generated_at`) VALUES (DEFAULT, 'ผรม.1-ผรม.1-0003-2568', 'doc_num:1:1:0:2025', '{ORG}-{ORG}-{SEQ:4}-{YEAR}', 3, DEFAULT, DEFAULT, 0, 0, DEFAULT) RETURNING `id`, `retry_count`, `generated_at`"
|
||||
},
|
||||
code: 'ER_BAD_FIELD_ERROR',
|
||||
errno: 1054,
|
||||
sqlState: '42S22',
|
||||
sqlMessage: "Unknown column 'generated_at' in 'RETURNING'",
|
||||
sql: "INSERT INTO `document_number_audit`(`id`, `generated_number`, `counter_key`, `template_used`, `sequence_number`, `user_id`, `ip_address`, `retry_count`, `lock_wait_ms`, `generated_at`) VALUES (DEFAULT, 'ผรม.1-ผรม.1-0003-2568', 'doc_num:1:1:0:2025', '{ORG}-{ORG}-{SEQ:4}-{YEAR}', 3, DEFAULT, DEFAULT, 0, 0, DEFAULT) RETURNING `id`, `retry_count`, `generated_at`"
|
||||
}
|
||||
[Nest] 5332 - 12/09/2025, 11:25:21 AM ERROR [WorkflowEngineService] Transition Failed for c4765f7d-fb12-4ca8-9fa7-10a237069581: Cannot read properties of undefined (reading 'terminal')
|
||||
[Nest] 5332 - 12/09/2025, 11:25:21 AM ERROR [CorrespondenceWorkflowService] Failed to submit workflow: TypeError: Cannot read properties of undefined (reading 'terminal')
|
||||
[Nest] 5332 - 12/09/2025, 11:25:21 AM ERROR [ExceptionsHandler] TypeError: Cannot read properties of undefined (reading 'terminal')
|
||||
at WorkflowEngineService.processTransition (D:\nap-dms.lcbp3\backend\src\modules\workflow-engine\workflow-engine.service.ts:274:36)
|
||||
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
||||
at CorrespondenceWorkflowService.submitWorkflow (D:\nap-dms.lcbp3\backend\src\modules\correspondence\correspondence-workflow.service.ts:73:32)
|
||||
FAIL test/phase3-workflow.e2e-spec.ts
|
||||
ΓùÅ Console
|
||||
|
||||
console.log
|
||||
Created Correspondence ID: 5
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:84:13)
|
||||
|
||||
console.warn
|
||||
Skipping action test - no instanceId from submit
|
||||
|
||||
104 | // Skip if submit failed to get instanceId
|
||||
105 | if (!workflowInstanceId) {
|
||||
> 106 | console.warn('Skipping action test - no instanceId from submit');
|
||||
| ^
|
||||
107 | return;
|
||||
108 | }
|
||||
109 |
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:106:15)
|
||||
|
||||
● Phase 3 Workflow (E2E) › /correspondences/:id/submit (POST) - Submit to Workflow
|
||||
|
||||
expected 201 "Created", got 500 "Internal Server Error"
|
||||
|
||||
92 | note: 'Submitting for E2E test',
|
||||
93 | })
|
||||
> 94 | .expect(201);
|
||||
| ^
|
||||
95 |
|
||||
96 | expect(response.body).toHaveProperty('instanceId');
|
||||
97 | expect(response.body).toHaveProperty('currentState');
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:94:8)
|
||||
----
|
||||
at Test._assertStatus (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:309:14)
|
||||
at ../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:365:13
|
||||
at Test._assertFunction (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:342:13)
|
||||
at Test.assert (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:195:23)
|
||||
at localAssert (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:138:14)
|
||||
at Server.<anonymous> (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:152:11)
|
||||
|
||||
A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find leaks. Active timers can also cause this, ensure that .unref() was called on them.
|
||||
Test Suites: 1 failed, 2 passed, 3 total
|
||||
Tests: 1 failed, 4 passed, 5 total
|
||||
Snapshots: 0 total
|
||||
Time: 5.321 s
|
||||
Ran all test suites.
|
||||
ΓÇëELIFECYCLEΓÇë Command failed with exit code 1.
|
||||
@@ -1,100 +0,0 @@
|
||||
|
||||
> backend@1.5.1 test:e2e D:\nap-dms.lcbp3\backend
|
||||
> jest --config ./test/jest-e2e.json
|
||||
|
||||
PASS test/simple.e2e-spec.ts
|
||||
PASS test/app.e2e-spec.ts
|
||||
[Nest] 16184 - 12/09/2025, 11:27:54 AM ERROR [DocumentNumberingService] Failed to log audit
|
||||
[Nest] 16184 - 12/09/2025, 11:27:54 AM ERROR [DocumentNumberingService] QueryFailedError: Unknown column 'generated_at' in 'RETURNING'
|
||||
at Query.onResult (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\driver\mysql\MysqlQueryRunner.ts:248:33)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:36:14)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
query: 'INSERT INTO `document_number_audit`(`id`, `generated_number`, `counter_key`, `template_used`, `sequence_number`, `user_id`, `ip_address`, `retry_count`, `lock_wait_ms`, `generated_at`) VALUES (DEFAULT, ?, ?, ?, ?, DEFAULT, DEFAULT, ?, ?, DEFAULT) RETURNING `id`, `retry_count`, `generated_at`',
|
||||
parameters: [
|
||||
'ผรม.1-ผรม.1-0004-2568',
|
||||
'doc_num:1:1:0:2025',
|
||||
'{ORG}-{ORG}-{SEQ:4}-{YEAR}',
|
||||
4,
|
||||
0,
|
||||
0
|
||||
],
|
||||
driverError: Error: Unknown column 'generated_at' in 'RETURNING'
|
||||
at Packet.asError (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packets\packet.js:740:17)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:29:26)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
code: 'ER_BAD_FIELD_ERROR',
|
||||
errno: 1054,
|
||||
sqlState: '42S22',
|
||||
sqlMessage: "Unknown column 'generated_at' in 'RETURNING'",
|
||||
sql: "INSERT INTO `document_number_audit`(`id`, `generated_number`, `counter_key`, `template_used`, `sequence_number`, `user_id`, `ip_address`, `retry_count`, `lock_wait_ms`, `generated_at`) VALUES (DEFAULT, 'ผรม.1-ผรม.1-0004-2568', 'doc_num:1:1:0:2025', '{ORG}-{ORG}-{SEQ:4}-{YEAR}', 4, DEFAULT, DEFAULT, 0, 0, DEFAULT) RETURNING `id`, `retry_count`, `generated_at`"
|
||||
},
|
||||
code: 'ER_BAD_FIELD_ERROR',
|
||||
errno: 1054,
|
||||
sqlState: '42S22',
|
||||
sqlMessage: "Unknown column 'generated_at' in 'RETURNING'",
|
||||
sql: "INSERT INTO `document_number_audit`(`id`, `generated_number`, `counter_key`, `template_used`, `sequence_number`, `user_id`, `ip_address`, `retry_count`, `lock_wait_ms`, `generated_at`) VALUES (DEFAULT, 'ผรม.1-ผรม.1-0004-2568', 'doc_num:1:1:0:2025', '{ORG}-{ORG}-{SEQ:4}-{YEAR}', 4, DEFAULT, DEFAULT, 0, 0, DEFAULT) RETURNING `id`, `retry_count`, `generated_at`"
|
||||
}
|
||||
FAIL test/phase3-workflow.e2e-spec.ts
|
||||
ΓùÅ Console
|
||||
|
||||
console.log
|
||||
Created Correspondence ID: 6
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:84:13)
|
||||
|
||||
console.log
|
||||
Workflow Instance ID: 3577a2e1-bada-4fe7-84f1-876ec83b0624
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:99:13)
|
||||
|
||||
console.log
|
||||
Current State: IN_REVIEW
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:100:13)
|
||||
|
||||
● Phase 3 Workflow (E2E) › /correspondences/:id/workflow/action (POST) - Process Action
|
||||
|
||||
expected 201 "Created", got 403 "Forbidden"
|
||||
|
||||
116 | comment: 'E2E Approved via Unified Workflow Engine',
|
||||
117 | })
|
||||
> 118 | .expect(201);
|
||||
| ^
|
||||
119 |
|
||||
120 | expect(response.body).toHaveProperty('success', true);
|
||||
121 | expect(response.body).toHaveProperty('nextState');
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:118:8)
|
||||
----
|
||||
at Test._assertStatus (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:309:14)
|
||||
at ../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:365:13
|
||||
at Test._assertFunction (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:342:13)
|
||||
at Test.assert (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:195:23)
|
||||
at localAssert (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:138:14)
|
||||
at Server.<anonymous> (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:152:11)
|
||||
|
||||
A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find leaks. Active timers can also cause this, ensure that .unref() was called on them.
|
||||
Test Suites: 1 failed, 2 passed, 3 total
|
||||
Tests: 1 failed, 4 passed, 5 total
|
||||
Snapshots: 0 total
|
||||
Time: 5.67 s
|
||||
Ran all test suites.
|
||||
ΓÇëELIFECYCLEΓÇë Command failed with exit code 1.
|
||||
@@ -1,100 +0,0 @@
|
||||
|
||||
> backend@1.5.1 test:e2e D:\nap-dms.lcbp3\backend
|
||||
> jest --config ./test/jest-e2e.json
|
||||
|
||||
PASS test/simple.e2e-spec.ts
|
||||
PASS test/app.e2e-spec.ts
|
||||
[Nest] 7212 - 12/09/2025, 11:32:17 AM ERROR [DocumentNumberingService] Failed to log audit
|
||||
[Nest] 7212 - 12/09/2025, 11:32:17 AM ERROR [DocumentNumberingService] QueryFailedError: Unknown column 'generated_at' in 'RETURNING'
|
||||
at Query.onResult (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\driver\mysql\MysqlQueryRunner.ts:248:33)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:36:14)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
query: 'INSERT INTO `document_number_audit`(`id`, `generated_number`, `counter_key`, `template_used`, `sequence_number`, `user_id`, `ip_address`, `retry_count`, `lock_wait_ms`, `generated_at`) VALUES (DEFAULT, ?, ?, ?, ?, DEFAULT, DEFAULT, ?, ?, DEFAULT) RETURNING `id`, `retry_count`, `generated_at`',
|
||||
parameters: [
|
||||
'ผรม.1-ผรม.1-0005-2568',
|
||||
'doc_num:1:1:0:2025',
|
||||
'{ORG}-{ORG}-{SEQ:4}-{YEAR}',
|
||||
5,
|
||||
0,
|
||||
0
|
||||
],
|
||||
driverError: Error: Unknown column 'generated_at' in 'RETURNING'
|
||||
at Packet.asError (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packets\packet.js:740:17)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:29:26)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
code: 'ER_BAD_FIELD_ERROR',
|
||||
errno: 1054,
|
||||
sqlState: '42S22',
|
||||
sqlMessage: "Unknown column 'generated_at' in 'RETURNING'",
|
||||
sql: "INSERT INTO `document_number_audit`(`id`, `generated_number`, `counter_key`, `template_used`, `sequence_number`, `user_id`, `ip_address`, `retry_count`, `lock_wait_ms`, `generated_at`) VALUES (DEFAULT, 'ผรม.1-ผรม.1-0005-2568', 'doc_num:1:1:0:2025', '{ORG}-{ORG}-{SEQ:4}-{YEAR}', 5, DEFAULT, DEFAULT, 0, 0, DEFAULT) RETURNING `id`, `retry_count`, `generated_at`"
|
||||
},
|
||||
code: 'ER_BAD_FIELD_ERROR',
|
||||
errno: 1054,
|
||||
sqlState: '42S22',
|
||||
sqlMessage: "Unknown column 'generated_at' in 'RETURNING'",
|
||||
sql: "INSERT INTO `document_number_audit`(`id`, `generated_number`, `counter_key`, `template_used`, `sequence_number`, `user_id`, `ip_address`, `retry_count`, `lock_wait_ms`, `generated_at`) VALUES (DEFAULT, 'ผรม.1-ผรม.1-0005-2568', 'doc_num:1:1:0:2025', '{ORG}-{ORG}-{SEQ:4}-{YEAR}', 5, DEFAULT, DEFAULT, 0, 0, DEFAULT) RETURNING `id`, `retry_count`, `generated_at`"
|
||||
}
|
||||
FAIL test/phase3-workflow.e2e-spec.ts
|
||||
ΓùÅ Console
|
||||
|
||||
console.log
|
||||
Created Correspondence ID: 7
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:84:13)
|
||||
|
||||
console.log
|
||||
Workflow Instance ID: 20c439a2-841c-40a1-96e7-5c9f8dfe234f
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:99:13)
|
||||
|
||||
console.log
|
||||
Current State: IN_REVIEW
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:100:13)
|
||||
|
||||
● Phase 3 Workflow (E2E) › /correspondences/:id/workflow/action (POST) - Process Action
|
||||
|
||||
expected 201 "Created", got 403 "Forbidden"
|
||||
|
||||
116 | comment: 'E2E Approved via Unified Workflow Engine',
|
||||
117 | })
|
||||
> 118 | .expect(201);
|
||||
| ^
|
||||
119 |
|
||||
120 | expect(response.body).toHaveProperty('success', true);
|
||||
121 | expect(response.body).toHaveProperty('nextState');
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:118:8)
|
||||
----
|
||||
at Test._assertStatus (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:309:14)
|
||||
at ../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:365:13
|
||||
at Test._assertFunction (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:342:13)
|
||||
at Test.assert (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:195:23)
|
||||
at localAssert (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:138:14)
|
||||
at Server.<anonymous> (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:152:11)
|
||||
|
||||
A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find leaks. Active timers can also cause this, ensure that .unref() was called on them.
|
||||
Test Suites: 1 failed, 2 passed, 3 total
|
||||
Tests: 1 failed, 4 passed, 5 total
|
||||
Snapshots: 0 total
|
||||
Time: 5.533 s
|
||||
Ran all test suites.
|
||||
ΓÇëELIFECYCLEΓÇë Command failed with exit code 1.
|
||||
@@ -1,100 +0,0 @@
|
||||
|
||||
> backend@1.5.1 test:e2e D:\nap-dms.lcbp3\backend
|
||||
> jest --config ./test/jest-e2e.json
|
||||
|
||||
PASS test/simple.e2e-spec.ts
|
||||
PASS test/app.e2e-spec.ts
|
||||
[Nest] 46180 - 12/09/2025, 11:40:20 AM ERROR [DocumentNumberingService] Failed to log audit
|
||||
[Nest] 46180 - 12/09/2025, 11:40:20 AM ERROR [DocumentNumberingService] QueryFailedError: Unknown column 'generated_at' in 'RETURNING'
|
||||
at Query.onResult (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\driver\mysql\MysqlQueryRunner.ts:248:33)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:36:14)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
query: 'INSERT INTO `document_number_audit`(`id`, `generated_number`, `counter_key`, `template_used`, `sequence_number`, `user_id`, `ip_address`, `retry_count`, `lock_wait_ms`, `generated_at`) VALUES (DEFAULT, ?, ?, ?, ?, DEFAULT, DEFAULT, ?, ?, DEFAULT) RETURNING `id`, `retry_count`, `generated_at`',
|
||||
parameters: [
|
||||
'ผรม.1-ผรม.1-0006-2568',
|
||||
'doc_num:1:1:0:2025',
|
||||
'{ORG}-{ORG}-{SEQ:4}-{YEAR}',
|
||||
6,
|
||||
0,
|
||||
0
|
||||
],
|
||||
driverError: Error: Unknown column 'generated_at' in 'RETURNING'
|
||||
at Packet.asError (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packets\packet.js:740:17)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:29:26)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
code: 'ER_BAD_FIELD_ERROR',
|
||||
errno: 1054,
|
||||
sqlState: '42S22',
|
||||
sqlMessage: "Unknown column 'generated_at' in 'RETURNING'",
|
||||
sql: "INSERT INTO `document_number_audit`(`id`, `generated_number`, `counter_key`, `template_used`, `sequence_number`, `user_id`, `ip_address`, `retry_count`, `lock_wait_ms`, `generated_at`) VALUES (DEFAULT, 'ผรม.1-ผรม.1-0006-2568', 'doc_num:1:1:0:2025', '{ORG}-{ORG}-{SEQ:4}-{YEAR}', 6, DEFAULT, DEFAULT, 0, 0, DEFAULT) RETURNING `id`, `retry_count`, `generated_at`"
|
||||
},
|
||||
code: 'ER_BAD_FIELD_ERROR',
|
||||
errno: 1054,
|
||||
sqlState: '42S22',
|
||||
sqlMessage: "Unknown column 'generated_at' in 'RETURNING'",
|
||||
sql: "INSERT INTO `document_number_audit`(`id`, `generated_number`, `counter_key`, `template_used`, `sequence_number`, `user_id`, `ip_address`, `retry_count`, `lock_wait_ms`, `generated_at`) VALUES (DEFAULT, 'ผรม.1-ผรม.1-0006-2568', 'doc_num:1:1:0:2025', '{ORG}-{ORG}-{SEQ:4}-{YEAR}', 6, DEFAULT, DEFAULT, 0, 0, DEFAULT) RETURNING `id`, `retry_count`, `generated_at`"
|
||||
}
|
||||
FAIL test/phase3-workflow.e2e-spec.ts
|
||||
ΓùÅ Console
|
||||
|
||||
console.log
|
||||
Created Correspondence ID: 8
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:84:13)
|
||||
|
||||
console.log
|
||||
Workflow Instance ID: 9fc9ddd7-5257-4363-b1f1-f9c22f581b44
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:99:13)
|
||||
|
||||
console.log
|
||||
Current State: IN_REVIEW
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:100:13)
|
||||
|
||||
● Phase 3 Workflow (E2E) › /correspondences/:id/workflow/action (POST) - Process Action
|
||||
|
||||
expected 201 "Created", got 403 "Forbidden"
|
||||
|
||||
116 | comment: 'E2E Approved via Unified Workflow Engine',
|
||||
117 | })
|
||||
> 118 | .expect(201);
|
||||
| ^
|
||||
119 |
|
||||
120 | expect(response.body).toHaveProperty('success', true);
|
||||
121 | expect(response.body).toHaveProperty('nextState');
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:118:8)
|
||||
----
|
||||
at Test._assertStatus (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:309:14)
|
||||
at ../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:365:13
|
||||
at Test._assertFunction (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:342:13)
|
||||
at Test.assert (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:195:23)
|
||||
at localAssert (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:138:14)
|
||||
at Server.<anonymous> (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:152:11)
|
||||
|
||||
A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find leaks. Active timers can also cause this, ensure that .unref() was called on them.
|
||||
Test Suites: 1 failed, 2 passed, 3 total
|
||||
Tests: 1 failed, 4 passed, 5 total
|
||||
Snapshots: 0 total
|
||||
Time: 5.568 s
|
||||
Ran all test suites.
|
||||
ΓÇëELIFECYCLEΓÇë Command failed with exit code 1.
|
||||
@@ -1,84 +0,0 @@
|
||||
|
||||
> backend@1.5.1 test:e2e D:\nap-dms.lcbp3\backend
|
||||
> jest --config ./test/jest-e2e.json
|
||||
|
||||
PASS test/simple.e2e-spec.ts
|
||||
PASS test/app.e2e-spec.ts
|
||||
[Nest] 38304 - 12/09/2025, 12:13:26 PM ERROR [DocumentNumberingService] Failed to log audit
|
||||
[Nest] 38304 - 12/09/2025, 12:13:26 PM ERROR [DocumentNumberingService] QueryFailedError: Unknown column 'generated_at' in 'RETURNING'
|
||||
at Query.onResult (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\driver\mysql\MysqlQueryRunner.ts:248:33)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:36:14)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
query: 'INSERT INTO `document_number_audit`(`id`, `generated_number`, `counter_key`, `template_used`, `sequence_number`, `user_id`, `ip_address`, `retry_count`, `lock_wait_ms`, `generated_at`) VALUES (DEFAULT, ?, ?, ?, ?, DEFAULT, DEFAULT, ?, ?, DEFAULT) RETURNING `id`, `retry_count`, `generated_at`',
|
||||
parameters: [
|
||||
'ผรม.1-ผรม.1-0007-2568',
|
||||
'doc_num:1:1:0:2025',
|
||||
'{ORG}-{ORG}-{SEQ:4}-{YEAR}',
|
||||
7,
|
||||
0,
|
||||
0
|
||||
],
|
||||
driverError: Error: Unknown column 'generated_at' in 'RETURNING'
|
||||
at Packet.asError (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packets\packet.js:740:17)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:29:26)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
code: 'ER_BAD_FIELD_ERROR',
|
||||
errno: 1054,
|
||||
sqlState: '42S22',
|
||||
sqlMessage: "Unknown column 'generated_at' in 'RETURNING'",
|
||||
sql: "INSERT INTO `document_number_audit`(`id`, `generated_number`, `counter_key`, `template_used`, `sequence_number`, `user_id`, `ip_address`, `retry_count`, `lock_wait_ms`, `generated_at`) VALUES (DEFAULT, 'ผรม.1-ผรม.1-0007-2568', 'doc_num:1:1:0:2025', '{ORG}-{ORG}-{SEQ:4}-{YEAR}', 7, DEFAULT, DEFAULT, 0, 0, DEFAULT) RETURNING `id`, `retry_count`, `generated_at`"
|
||||
},
|
||||
code: 'ER_BAD_FIELD_ERROR',
|
||||
errno: 1054,
|
||||
sqlState: '42S22',
|
||||
sqlMessage: "Unknown column 'generated_at' in 'RETURNING'",
|
||||
sql: "INSERT INTO `document_number_audit`(`id`, `generated_number`, `counter_key`, `template_used`, `sequence_number`, `user_id`, `ip_address`, `retry_count`, `lock_wait_ms`, `generated_at`) VALUES (DEFAULT, 'ผรม.1-ผรม.1-0007-2568', 'doc_num:1:1:0:2025', '{ORG}-{ORG}-{SEQ:4}-{YEAR}', 7, DEFAULT, DEFAULT, 0, 0, DEFAULT) RETURNING `id`, `retry_count`, `generated_at`"
|
||||
}
|
||||
PASS test/phase3-workflow.e2e-spec.ts (5.236 s)
|
||||
ΓùÅ Console
|
||||
|
||||
console.log
|
||||
Created Correspondence ID: 9
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:84:13)
|
||||
|
||||
console.log
|
||||
Workflow Instance ID: d601ef06-93e0-435c-ad76-fc6e3dee5c22
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:99:13)
|
||||
|
||||
console.log
|
||||
Current State: IN_REVIEW
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:100:13)
|
||||
|
||||
console.log
|
||||
Action Result: { success: true, nextState: 'APPROVED', events: [], isCompleted: true }
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:122:13)
|
||||
|
||||
A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find leaks. Active timers can also cause this, ensure that .unref() was called on them.
|
||||
|
||||
Test Suites: 3 passed, 3 total
|
||||
Tests: 5 passed, 5 total
|
||||
Snapshots: 0 total
|
||||
Time: 6.691 s
|
||||
Ran all test suites.
|
||||
@@ -1,84 +0,0 @@
|
||||
|
||||
> backend@1.5.1 test:e2e D:\nap-dms.lcbp3\backend
|
||||
> jest --config ./test/jest-e2e.json
|
||||
|
||||
PASS test/simple.e2e-spec.ts
|
||||
PASS test/app.e2e-spec.ts
|
||||
[Nest] 38760 - 12/09/2025, 12:16:40 PM ERROR [DocumentNumberingService] Failed to log audit
|
||||
[Nest] 38760 - 12/09/2025, 12:16:40 PM ERROR [DocumentNumberingService] QueryFailedError: Unknown column 'generated_at' in 'RETURNING'
|
||||
at Query.onResult (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\driver\mysql\MysqlQueryRunner.ts:248:33)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:36:14)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
query: 'INSERT INTO `document_number_audit`(`id`, `generated_number`, `counter_key`, `template_used`, `sequence_number`, `user_id`, `ip_address`, `retry_count`, `lock_wait_ms`, `generated_at`) VALUES (DEFAULT, ?, ?, ?, ?, DEFAULT, DEFAULT, ?, ?, DEFAULT) RETURNING `id`, `retry_count`, `generated_at`',
|
||||
parameters: [
|
||||
'ผรม.1-ผรม.1-0008-2568',
|
||||
'doc_num:1:1:0:2025',
|
||||
'{ORG}-{ORG}-{SEQ:4}-{YEAR}',
|
||||
8,
|
||||
0,
|
||||
0
|
||||
],
|
||||
driverError: Error: Unknown column 'generated_at' in 'RETURNING'
|
||||
at Packet.asError (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packets\packet.js:740:17)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:29:26)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
code: 'ER_BAD_FIELD_ERROR',
|
||||
errno: 1054,
|
||||
sqlState: '42S22',
|
||||
sqlMessage: "Unknown column 'generated_at' in 'RETURNING'",
|
||||
sql: "INSERT INTO `document_number_audit`(`id`, `generated_number`, `counter_key`, `template_used`, `sequence_number`, `user_id`, `ip_address`, `retry_count`, `lock_wait_ms`, `generated_at`) VALUES (DEFAULT, 'ผรม.1-ผรม.1-0008-2568', 'doc_num:1:1:0:2025', '{ORG}-{ORG}-{SEQ:4}-{YEAR}', 8, DEFAULT, DEFAULT, 0, 0, DEFAULT) RETURNING `id`, `retry_count`, `generated_at`"
|
||||
},
|
||||
code: 'ER_BAD_FIELD_ERROR',
|
||||
errno: 1054,
|
||||
sqlState: '42S22',
|
||||
sqlMessage: "Unknown column 'generated_at' in 'RETURNING'",
|
||||
sql: "INSERT INTO `document_number_audit`(`id`, `generated_number`, `counter_key`, `template_used`, `sequence_number`, `user_id`, `ip_address`, `retry_count`, `lock_wait_ms`, `generated_at`) VALUES (DEFAULT, 'ผรม.1-ผรม.1-0008-2568', 'doc_num:1:1:0:2025', '{ORG}-{ORG}-{SEQ:4}-{YEAR}', 8, DEFAULT, DEFAULT, 0, 0, DEFAULT) RETURNING `id`, `retry_count`, `generated_at`"
|
||||
}
|
||||
PASS test/phase3-workflow.e2e-spec.ts
|
||||
ΓùÅ Console
|
||||
|
||||
console.log
|
||||
Created Correspondence ID: 10
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:84:13)
|
||||
|
||||
console.log
|
||||
Workflow Instance ID: 5057da48-f0e5-4d1a-86f1-a1b96929a6eb
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:99:13)
|
||||
|
||||
console.log
|
||||
Current State: IN_REVIEW
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:100:13)
|
||||
|
||||
console.log
|
||||
Action Result: { success: true, nextState: 'APPROVED', events: [], isCompleted: true }
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:122:13)
|
||||
|
||||
A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find leaks. Active timers can also cause this, ensure that .unref() was called on them.
|
||||
|
||||
Test Suites: 3 passed, 3 total
|
||||
Tests: 5 passed, 5 total
|
||||
Snapshots: 0 total
|
||||
Time: 5.885 s, estimated 6 s
|
||||
Ran all test suites.
|
||||
@@ -1,63 +0,0 @@
|
||||
|
||||
> backend@1.5.1 test:e2e
|
||||
> jest --config ./test/jest-e2e.json
|
||||
|
||||
PASS test/simple.e2e-spec.ts (7.275 s)
|
||||
PASS test/app.e2e-spec.ts (7.566 s)
|
||||
FAIL test/phase3-workflow.e2e-spec.ts (7.639 s)
|
||||
● Phase 3 Workflow (E2E) › /correspondences (POST) - Create Document
|
||||
|
||||
QueryFailedError: Table 'lcbp3_dev.correspondence_routing_templates' doesn't exist
|
||||
|
||||
at Query.onResult (../../node_modules/.pnpm/typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08/src/driver/mysql/MysqlQueryRunner.ts:248:33)
|
||||
at Query.execute (../../node_modules/.pnpm/mysql2@3.15.3/node_modules/mysql2/lib/commands/command.js:36:14)
|
||||
at PoolConnection.handlePacket (../../node_modules/.pnpm/mysql2@3.15.3/node_modules/mysql2/lib/base/connection.js:477:34)
|
||||
at PacketParser.onPacket (../../node_modules/.pnpm/mysql2@3.15.3/node_modules/mysql2/lib/base/connection.js:93:12)
|
||||
at PacketParser.executeStart (../../node_modules/.pnpm/mysql2@3.15.3/node_modules/mysql2/lib/packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (../../node_modules/.pnpm/mysql2@3.15.3/node_modules/mysql2/lib/base/connection.js:100:25)
|
||||
|
||||
● Phase 3 Workflow (E2E) › /correspondences/:id/submit (POST) - Submit Workflow
|
||||
|
||||
QueryFailedError: Table 'lcbp3_dev.correspondence_routing_templates' doesn't exist
|
||||
|
||||
at Query.onResult (../../node_modules/.pnpm/typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08/src/driver/mysql/MysqlQueryRunner.ts:248:33)
|
||||
at Query.execute (../../node_modules/.pnpm/mysql2@3.15.3/node_modules/mysql2/lib/commands/command.js:36:14)
|
||||
at PoolConnection.handlePacket (../../node_modules/.pnpm/mysql2@3.15.3/node_modules/mysql2/lib/base/connection.js:477:34)
|
||||
at PacketParser.onPacket (../../node_modules/.pnpm/mysql2@3.15.3/node_modules/mysql2/lib/base/connection.js:93:12)
|
||||
at PacketParser.executeStart (../../node_modules/.pnpm/mysql2@3.15.3/node_modules/mysql2/lib/packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (../../node_modules/.pnpm/mysql2@3.15.3/node_modules/mysql2/lib/base/connection.js:100:25)
|
||||
|
||||
● Phase 3 Workflow (E2E) › /correspondences/:id/workflow/action (POST) - Approve Step
|
||||
|
||||
QueryFailedError: Table 'lcbp3_dev.correspondence_routing_templates' doesn't exist
|
||||
|
||||
at Query.onResult (../../node_modules/.pnpm/typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08/src/driver/mysql/MysqlQueryRunner.ts:248:33)
|
||||
at Query.execute (../../node_modules/.pnpm/mysql2@3.15.3/node_modules/mysql2/lib/commands/command.js:36:14)
|
||||
at PoolConnection.handlePacket (../../node_modules/.pnpm/mysql2@3.15.3/node_modules/mysql2/lib/base/connection.js:477:34)
|
||||
at PacketParser.onPacket (../../node_modules/.pnpm/mysql2@3.15.3/node_modules/mysql2/lib/base/connection.js:93:12)
|
||||
at PacketParser.executeStart (../../node_modules/.pnpm/mysql2@3.15.3/node_modules/mysql2/lib/packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (../../node_modules/.pnpm/mysql2@3.15.3/node_modules/mysql2/lib/base/connection.js:100:25)
|
||||
|
||||
|
||||
ΓùÅ Test suite failed to run
|
||||
|
||||
TypeORMError: Empty criteria(s) are not allowed for the delete method.
|
||||
|
||||
67 | if (dataSource) {
|
||||
68 | const templateRepo = dataSource.getRepository(RoutingTemplate);
|
||||
> 69 | await templateRepo.delete(templateId);
|
||||
| ^
|
||||
70 | // Correspondence cleanup might be needed if not using a test DB
|
||||
71 | }
|
||||
72 | await app.close();
|
||||
|
||||
at EntityManager.delete (../../node_modules/.pnpm/typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08/src/entity-manager/EntityManager.ts:849:17)
|
||||
at Repository.delete (../../node_modules/.pnpm/typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08/src/repository/Repository.ts:420:35)
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:69:32)
|
||||
|
||||
A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find leaks. Active timers can also cause this, ensure that .unref() was called on them.
|
||||
Test Suites: 1 failed, 2 passed, 3 total
|
||||
Tests: 3 failed, 2 passed, 5 total
|
||||
Snapshots: 0 total
|
||||
Time: 9.08 s
|
||||
Ran all test suites.
|
||||
@@ -1,165 +0,0 @@
|
||||
|
||||
> backend@1.5.1 test:e2e
|
||||
> jest --config ./test/jest-e2e.json
|
||||
|
||||
[Nest] 28712 - 12/09/2025, 9:48:43 AM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (1)...
|
||||
TypeORMError: Entity metadata for RoutingTemplate#steps was not found. Check if you specified a correct entity object and if it's connected in the connection options.
|
||||
at D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\metadata-builder\EntityMetadataBuilder.ts:1128:23
|
||||
at Array.forEach (<anonymous>)
|
||||
at EntityMetadataBuilder.computeInverseProperties (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\metadata-builder\EntityMetadataBuilder.ts:1118:34)
|
||||
at D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\metadata-builder\EntityMetadataBuilder.ts:160:18
|
||||
at Array.forEach (<anonymous>)
|
||||
at EntityMetadataBuilder.build (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\metadata-builder\EntityMetadataBuilder.ts:159:25)
|
||||
at ConnectionMetadataBuilder.buildEntityMetadatas (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\connection\ConnectionMetadataBuilder.ts:106:11)
|
||||
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
||||
at DataSource.buildMetadatas (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\data-source\DataSource.ts:733:13)
|
||||
at DataSource.initialize (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\data-source\DataSource.ts:264:13)
|
||||
[Nest] 40512 - 12/09/2025, 9:48:43 AM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (1)...
|
||||
TypeORMError: Entity metadata for RoutingTemplate#steps was not found. Check if you specified a correct entity object and if it's connected in the connection options.
|
||||
at D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\metadata-builder\EntityMetadataBuilder.ts:1128:23
|
||||
at Array.forEach (<anonymous>)
|
||||
at EntityMetadataBuilder.computeInverseProperties (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\metadata-builder\EntityMetadataBuilder.ts:1118:34)
|
||||
at D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\metadata-builder\EntityMetadataBuilder.ts:160:18
|
||||
at Array.forEach (<anonymous>)
|
||||
at EntityMetadataBuilder.build (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\metadata-builder\EntityMetadataBuilder.ts:159:25)
|
||||
at ConnectionMetadataBuilder.buildEntityMetadatas (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\connection\ConnectionMetadataBuilder.ts:106:11)
|
||||
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
||||
at DataSource.buildMetadatas (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\data-source\DataSource.ts:733:13)
|
||||
at DataSource.initialize (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\data-source\DataSource.ts:264:13)
|
||||
[Nest] 41884 - 12/09/2025, 9:48:43 AM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (1)...
|
||||
TypeORMError: Entity metadata for RoutingTemplate#steps was not found. Check if you specified a correct entity object and if it's connected in the connection options.
|
||||
at D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\metadata-builder\EntityMetadataBuilder.ts:1128:23
|
||||
at Array.forEach (<anonymous>)
|
||||
at EntityMetadataBuilder.computeInverseProperties (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\metadata-builder\EntityMetadataBuilder.ts:1118:34)
|
||||
at D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\metadata-builder\EntityMetadataBuilder.ts:160:18
|
||||
at Array.forEach (<anonymous>)
|
||||
at EntityMetadataBuilder.build (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\metadata-builder\EntityMetadataBuilder.ts:159:25)
|
||||
at ConnectionMetadataBuilder.buildEntityMetadatas (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\connection\ConnectionMetadataBuilder.ts:106:11)
|
||||
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
||||
at DataSource.buildMetadatas (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\data-source\DataSource.ts:733:13)
|
||||
at DataSource.initialize (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\data-source\DataSource.ts:264:13)
|
||||
[Nest] 41884 - 12/09/2025, 9:48:46 AM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (2)...
|
||||
TypeORMError: Entity metadata for RoutingTemplate#steps was not found. Check if you specified a correct entity object and if it's connected in the connection options.
|
||||
at D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\metadata-builder\EntityMetadataBuilder.ts:1128:23
|
||||
at Array.forEach (<anonymous>)
|
||||
at EntityMetadataBuilder.computeInverseProperties (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\metadata-builder\EntityMetadataBuilder.ts:1118:34)
|
||||
at D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\metadata-builder\EntityMetadataBuilder.ts:160:18
|
||||
at Array.forEach (<anonymous>)
|
||||
at EntityMetadataBuilder.build (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\metadata-builder\EntityMetadataBuilder.ts:159:25)
|
||||
at ConnectionMetadataBuilder.buildEntityMetadatas (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\connection\ConnectionMetadataBuilder.ts:106:11)
|
||||
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
||||
at DataSource.buildMetadatas (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\data-source\DataSource.ts:733:13)
|
||||
at DataSource.initialize (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\data-source\DataSource.ts:264:13)
|
||||
[Nest] 28712 - 12/09/2025, 9:48:46 AM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (2)...
|
||||
TypeORMError: Entity metadata for RoutingTemplate#steps was not found. Check if you specified a correct entity object and if it's connected in the connection options.
|
||||
at D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\metadata-builder\EntityMetadataBuilder.ts:1128:23
|
||||
at Array.forEach (<anonymous>)
|
||||
at EntityMetadataBuilder.computeInverseProperties (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\metadata-builder\EntityMetadataBuilder.ts:1118:34)
|
||||
at D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\metadata-builder\EntityMetadataBuilder.ts:160:18
|
||||
at Array.forEach (<anonymous>)
|
||||
at EntityMetadataBuilder.build (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\metadata-builder\EntityMetadataBuilder.ts:159:25)
|
||||
at ConnectionMetadataBuilder.buildEntityMetadatas (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\connection\ConnectionMetadataBuilder.ts:106:11)
|
||||
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
||||
at DataSource.buildMetadatas (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\data-source\DataSource.ts:733:13)
|
||||
at DataSource.initialize (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\data-source\DataSource.ts:264:13)
|
||||
[Nest] 40512 - 12/09/2025, 9:48:46 AM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (2)...
|
||||
TypeORMError: Entity metadata for RoutingTemplate#steps was not found. Check if you specified a correct entity object and if it's connected in the connection options.
|
||||
at D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\metadata-builder\EntityMetadataBuilder.ts:1128:23
|
||||
at Array.forEach (<anonymous>)
|
||||
at EntityMetadataBuilder.computeInverseProperties (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\metadata-builder\EntityMetadataBuilder.ts:1118:34)
|
||||
at D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\metadata-builder\EntityMetadataBuilder.ts:160:18
|
||||
at Array.forEach (<anonymous>)
|
||||
at EntityMetadataBuilder.build (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\metadata-builder\EntityMetadataBuilder.ts:159:25)
|
||||
at ConnectionMetadataBuilder.buildEntityMetadatas (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\connection\ConnectionMetadataBuilder.ts:106:11)
|
||||
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
||||
at DataSource.buildMetadatas (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\data-source\DataSource.ts:733:13)
|
||||
at DataSource.initialize (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\data-source\DataSource.ts:264:13)
|
||||
FAIL test/app.e2e-spec.ts (8.781 s)
|
||||
● AppController (e2e) › / (GET)
|
||||
|
||||
thrown: "Exceeded timeout of 5000 ms for a hook.
|
||||
Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."
|
||||
|
||||
8 | let app: INestApplication<App>;
|
||||
9 |
|
||||
> 10 | beforeEach(async () => {
|
||||
| ^
|
||||
11 | const moduleFixture: TestingModule = await Test.createTestingModule({
|
||||
12 | imports: [AppModule],
|
||||
13 | }).compile();
|
||||
|
||||
at app.e2e-spec.ts:10:3
|
||||
at Object.<anonymous> (app.e2e-spec.ts:7:1)
|
||||
|
||||
FAIL test/phase3-workflow.e2e-spec.ts (8.787 s)
|
||||
● Phase 3 Workflow (E2E) › /correspondences (POST) - Create Document
|
||||
|
||||
thrown: "Exceeded timeout of 5000 ms for a hook.
|
||||
Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."
|
||||
|
||||
27 | let adminToken: string;
|
||||
28 |
|
||||
> 29 | beforeAll(async () => {
|
||||
| ^
|
||||
30 | const moduleFixture: TestingModule = await Test.createTestingModule({
|
||||
31 | imports: [AppModule],
|
||||
32 | }).compile();
|
||||
|
||||
at phase3-workflow.e2e-spec.ts:29:3
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:15:1)
|
||||
|
||||
● Phase 3 Workflow (E2E) › /correspondences/:id/submit (POST) - Submit to Workflow
|
||||
|
||||
thrown: "Exceeded timeout of 5000 ms for a hook.
|
||||
Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."
|
||||
|
||||
27 | let adminToken: string;
|
||||
28 |
|
||||
> 29 | beforeAll(async () => {
|
||||
| ^
|
||||
30 | const moduleFixture: TestingModule = await Test.createTestingModule({
|
||||
31 | imports: [AppModule],
|
||||
32 | }).compile();
|
||||
|
||||
at phase3-workflow.e2e-spec.ts:29:3
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:15:1)
|
||||
|
||||
● Phase 3 Workflow (E2E) › /correspondences/:id/workflow/action (POST) - Process Action
|
||||
|
||||
thrown: "Exceeded timeout of 5000 ms for a hook.
|
||||
Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."
|
||||
|
||||
27 | let adminToken: string;
|
||||
28 |
|
||||
> 29 | beforeAll(async () => {
|
||||
| ^
|
||||
30 | const moduleFixture: TestingModule = await Test.createTestingModule({
|
||||
31 | imports: [AppModule],
|
||||
32 | }).compile();
|
||||
|
||||
at phase3-workflow.e2e-spec.ts:29:3
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:15:1)
|
||||
|
||||
FAIL test/simple.e2e-spec.ts (8.797 s)
|
||||
● Simple Test › should pass
|
||||
|
||||
thrown: "Exceeded timeout of 5000 ms for a test.
|
||||
Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."
|
||||
|
||||
6 |
|
||||
7 | describe('Simple Test', () => {
|
||||
> 8 | it('should pass', async () => {
|
||||
| ^
|
||||
9 | const moduleFixture: TestingModule = await Test.createTestingModule({
|
||||
10 | imports: [AppModule],
|
||||
11 | }).compile();
|
||||
|
||||
at simple.e2e-spec.ts:8:3
|
||||
at Object.<anonymous> (simple.e2e-spec.ts:7:1)
|
||||
|
||||
A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find leaks. Active timers can also cause this, ensure that .unref() was called on them.
|
||||
Test Suites: 3 failed, 3 total
|
||||
Tests: 5 failed, 5 total
|
||||
Snapshots: 0 total
|
||||
Time: 9.98 s
|
||||
Ran all test suites.
|
||||
@@ -1,83 +0,0 @@
|
||||
|
||||
> backend@1.5.1 test:e2e
|
||||
> jest --config ./test/jest-e2e.json
|
||||
|
||||
PASS test/simple.e2e-spec.ts
|
||||
PASS test/app.e2e-spec.ts
|
||||
FAIL test/phase3-workflow.e2e-spec.ts
|
||||
ΓùÅ Console
|
||||
|
||||
console.warn
|
||||
WorkflowDefinition CORRESPONDENCE_FLOW_V1 not found. Tests may fail.
|
||||
|
||||
55 |
|
||||
56 | if (!existing) {
|
||||
> 57 | console.warn(
|
||||
| ^
|
||||
58 | 'WorkflowDefinition CORRESPONDENCE_FLOW_V1 not found. Tests may fail.'
|
||||
59 | );
|
||||
60 | }
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:57:15)
|
||||
|
||||
console.warn
|
||||
Skipping action test - no instanceId from submit
|
||||
|
||||
104 | // Skip if submit failed to get instanceId
|
||||
105 | if (!workflowInstanceId) {
|
||||
> 106 | console.warn('Skipping action test - no instanceId from submit');
|
||||
| ^
|
||||
107 | return;
|
||||
108 | }
|
||||
109 |
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:106:15)
|
||||
|
||||
● Phase 3 Workflow (E2E) › /correspondences (POST) - Create Document
|
||||
|
||||
expected 201 "Created", got 403 "Forbidden"
|
||||
|
||||
77 | details: { question: 'Testing Unified Workflow' },
|
||||
78 | })
|
||||
> 79 | .expect(201);
|
||||
| ^
|
||||
80 |
|
||||
81 | expect(response.body).toHaveProperty('id');
|
||||
82 | expect(response.body).toHaveProperty('correspondenceNumber');
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:79:8)
|
||||
----
|
||||
at Test._assertStatus (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:309:14)
|
||||
at ../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:365:13
|
||||
at Test._assertFunction (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:342:13)
|
||||
at Test.assert (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:195:23)
|
||||
at localAssert (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:138:14)
|
||||
at Server.<anonymous> (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:152:11)
|
||||
|
||||
● Phase 3 Workflow (E2E) › /correspondences/:id/submit (POST) - Submit to Workflow
|
||||
|
||||
expected 201 "Created", got 403 "Forbidden"
|
||||
|
||||
92 | note: 'Submitting for E2E test',
|
||||
93 | })
|
||||
> 94 | .expect(201);
|
||||
| ^
|
||||
95 |
|
||||
96 | expect(response.body).toHaveProperty('instanceId');
|
||||
97 | expect(response.body).toHaveProperty('currentState');
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:94:8)
|
||||
----
|
||||
at Test._assertStatus (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:309:14)
|
||||
at ../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:365:13
|
||||
at Test._assertFunction (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:342:13)
|
||||
at Test.assert (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:195:23)
|
||||
at localAssert (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:138:14)
|
||||
at Server.<anonymous> (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:152:11)
|
||||
|
||||
A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find leaks. Active timers can also cause this, ensure that .unref() was called on them.
|
||||
Test Suites: 1 failed, 2 passed, 3 total
|
||||
Tests: 2 failed, 3 passed, 5 total
|
||||
Snapshots: 0 total
|
||||
Time: 5.219 s, estimated 9 s
|
||||
Ran all test suites.
|
||||
@@ -1,214 +0,0 @@
|
||||
|
||||
> backend@1.5.1 test:e2e D:\nap-dms.lcbp3\backend
|
||||
> jest --config ./test/jest-e2e.json
|
||||
|
||||
PASS test/simple.e2e-spec.ts
|
||||
PASS test/app.e2e-spec.ts
|
||||
[Nest] 45012 - 12/09/2025, 10:04:29 AM ERROR [DocumentNumberingService] Error generating number for doc_num:1:1:0:2025
|
||||
[Nest] 45012 - 12/09/2025, 10:04:29 AM ERROR [DocumentNumberingService] QueryFailedError: Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `document_number_counters_ibfk_3` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)
|
||||
at Query.onResult (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\driver\mysql\MysqlQueryRunner.ts:248:33)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:36:14)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
query: 'INSERT INTO `document_number_counters`(`project_id`, `originator_organization_id`, `correspondence_type_id`, `discipline_id`, `current_year`, `last_number`, `version`) VALUES (?, ?, ?, ?, ?, ?, 1) RETURNING `discipline_id`, `last_number`, `version`',
|
||||
parameters: [
|
||||
1,
|
||||
41,
|
||||
1,
|
||||
0,
|
||||
2025,
|
||||
1
|
||||
],
|
||||
driverError: Error: Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `document_number_counters_ibfk_3` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)
|
||||
at Packet.asError (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packets\packet.js:740:17)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:29:26)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
code: 'ER_NO_REFERENCED_ROW_2',
|
||||
errno: 1452,
|
||||
sqlState: '23000',
|
||||
sqlMessage: 'Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `document_number_counters_ibfk_3` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)',
|
||||
sql: 'INSERT INTO `document_number_counters`(`project_id`, `originator_organization_id`, `correspondence_type_id`, `discipline_id`, `current_year`, `last_number`, `version`) VALUES (1, 41, 1, 0, 2025, 1, 1) RETURNING `discipline_id`, `last_number`, `version`'
|
||||
},
|
||||
code: 'ER_NO_REFERENCED_ROW_2',
|
||||
errno: 1452,
|
||||
sqlState: '23000',
|
||||
sqlMessage: 'Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `document_number_counters_ibfk_3` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)',
|
||||
sql: 'INSERT INTO `document_number_counters`(`project_id`, `originator_organization_id`, `correspondence_type_id`, `discipline_id`, `current_year`, `last_number`, `version`) VALUES (1, 41, 1, 0, 2025, 1, 1) RETURNING `discipline_id`, `last_number`, `version`'
|
||||
}
|
||||
[Nest] 45012 - 12/09/2025, 10:04:29 AM ERROR [DocumentNumberingService] Failed to log error
|
||||
[Nest] 45012 - 12/09/2025, 10:04:29 AM ERROR [DocumentNumberingService] QueryFailedError: Unknown column 'error_at' in 'RETURNING'
|
||||
at Query.onResult (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\driver\mysql\MysqlQueryRunner.ts:248:33)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:36:14)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
query: 'INSERT INTO `document_number_errors`(`id`, `counter_key`, `error_type`, `error_message`, `stack_trace`, `user_id`, `ip_address`, `context`, `error_at`) VALUES (DEFAULT, ?, ?, ?, ?, DEFAULT, DEFAULT, ?, DEFAULT) RETURNING `id`, `error_at`',
|
||||
parameters: [
|
||||
'doc_num:1:1:0:2025',
|
||||
'DB_ERROR',
|
||||
'Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `document_number_counters_ibfk_3` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)',
|
||||
'QueryFailedError: Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `document_number_counters_ibfk_3` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)\n at Query.onResult (D:\\nap-dms.lcbp3\\node_modules\\.pnpm\\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\\src\\driver\\mysql\\MysqlQueryRunner.ts:248:33)\n at Query.execute (D:\\nap-dms.lcbp3\\node_modules\\.pnpm\\mysql2@3.15.3\\node_modules\\mysql2\\lib\\commands\\command.js:36:14)\n at PoolConnection.handlePacket (D:\\nap-dms.lcbp3\\node_modules\\.pnpm\\mysql2@3.15.3\\node_modules\\mysql2\\lib\\base\\connection.js:477:34)\n at PacketParser.onPacket (D:\\nap-dms.lcbp3\\node_modules\\.pnpm\\mysql2@3.15.3\\node_modules\\mysql2\\lib\\base\\connection.js:93:12)\n at PacketParser.executeStart (D:\\nap-dms.lcbp3\\node_modules\\.pnpm\\mysql2@3.15.3\\node_modules\\mysql2\\lib\\packet_parser.js:75:16)\n at Socket.<anonymous> (D:\\nap-dms.lcbp3\\node_modules\\.pnpm\\mysql2@3.15.3\\node_modules\\mysql2\\lib\\base\\connection.js:100:25)\n at Socket.emit (node:events:519:28)\n at addChunk (node:internal/streams/readable:561:12)\n at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\n at Socket.Readable.push (node:internal/streams/readable:392:5)\n at TCP.onStreamRead (node:internal/stream_base_commons:189:23)\n at TCP.callbackTrampoline (node:internal/async_hooks:130:17)',
|
||||
'{"projectId":1,"originatorId":41,"typeId":1,"year":2025,"customTokens":{"TYPE_CODE":"RFA","ORG_CODE":"ORG"}}'
|
||||
],
|
||||
driverError: Error: Unknown column 'error_at' in 'RETURNING'
|
||||
at Packet.asError (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packets\packet.js:740:17)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:29:26)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
code: 'ER_BAD_FIELD_ERROR',
|
||||
errno: 1054,
|
||||
sqlState: '42S22',
|
||||
sqlMessage: "Unknown column 'error_at' in 'RETURNING'",
|
||||
sql: 'INSERT INTO `document_number_errors`(`id`, `counter_key`, `error_type`, `error_message`, `stack_trace`, `user_id`, `ip_address`, `context`, `error_at`) VALUES (DEFAULT, \'doc_num:1:1:0:2025\', \'DB_ERROR\', \'Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `document_number_counters_ibfk_3` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)\', \'QueryFailedError: Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `document_number_counters_ibfk_3` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)\\n at Query.onResult (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\\\\src\\\\driver\\\\mysql\\\\MysqlQueryRunner.ts:248:33)\\n at Query.execute (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\mysql2@3.15.3\\\\node_modules\\\\mysql2\\\\lib\\\\commands\\\\command.js:36:14)\\n at PoolConnection.handlePacket (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\mysql2@3.15.3\\\\node_modules\\\\mysql2\\\\lib\\\\base\\\\connection.js:477:34)\\n at PacketParser.onPacket (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\mysql2@3.15.3\\\\node_modules\\\\mysql2\\\\lib\\\\base\\\\connection.js:93:12)\\n at PacketParser.executeStart (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\mysql2@3.15.3\\\\node_modules\\\\mysql2\\\\lib\\\\packet_parser.js:75:16)\\n at Socket.<anonymous> (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\mysql2@3.15.3\\\\node_modules\\\\mysql2\\\\lib\\\\base\\\\connection.js:100:25)\\n at Socket.emit (node:events:519:28)\\n at addChunk (node:internal/streams/readable:561:12)\\n at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\\n at Socket.Readable.push (node:internal/streams/readable:392:5)\\n at TCP.onStreamRead (node:internal/stream_base_commons:189:23)\\n at TCP.callbackTrampoline (node:internal/async_hooks:130:17)\', DEFAULT, DEFAULT, \'{\\"projectId\\":1,\\"originatorId\\":41,\\"typeId\\":1,\\"year\\":2025,\\"customTokens\\":{\\"TYPE_CODE\\":\\"RFA\\",\\"ORG_CODE\\":\\"ORG\\"}}\', DEFAULT) RETURNING `id`, `error_at`'
|
||||
},
|
||||
code: 'ER_BAD_FIELD_ERROR',
|
||||
errno: 1054,
|
||||
sqlState: '42S22',
|
||||
sqlMessage: "Unknown column 'error_at' in 'RETURNING'",
|
||||
sql: 'INSERT INTO `document_number_errors`(`id`, `counter_key`, `error_type`, `error_message`, `stack_trace`, `user_id`, `ip_address`, `context`, `error_at`) VALUES (DEFAULT, \'doc_num:1:1:0:2025\', \'DB_ERROR\', \'Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `document_number_counters_ibfk_3` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)\', \'QueryFailedError: Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `document_number_counters_ibfk_3` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)\\n at Query.onResult (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\\\\src\\\\driver\\\\mysql\\\\MysqlQueryRunner.ts:248:33)\\n at Query.execute (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\mysql2@3.15.3\\\\node_modules\\\\mysql2\\\\lib\\\\commands\\\\command.js:36:14)\\n at PoolConnection.handlePacket (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\mysql2@3.15.3\\\\node_modules\\\\mysql2\\\\lib\\\\base\\\\connection.js:477:34)\\n at PacketParser.onPacket (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\mysql2@3.15.3\\\\node_modules\\\\mysql2\\\\lib\\\\base\\\\connection.js:93:12)\\n at PacketParser.executeStart (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\mysql2@3.15.3\\\\node_modules\\\\mysql2\\\\lib\\\\packet_parser.js:75:16)\\n at Socket.<anonymous> (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\mysql2@3.15.3\\\\node_modules\\\\mysql2\\\\lib\\\\base\\\\connection.js:100:25)\\n at Socket.emit (node:events:519:28)\\n at addChunk (node:internal/streams/readable:561:12)\\n at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\\n at Socket.Readable.push (node:internal/streams/readable:392:5)\\n at TCP.onStreamRead (node:internal/stream_base_commons:189:23)\\n at TCP.callbackTrampoline (node:internal/async_hooks:130:17)\', DEFAULT, DEFAULT, \'{\\"projectId\\":1,\\"originatorId\\":41,\\"typeId\\":1,\\"year\\":2025,\\"customTokens\\":{\\"TYPE_CODE\\":\\"RFA\\",\\"ORG_CODE\\":\\"ORG\\"}}\', DEFAULT) RETURNING `id`, `error_at`'
|
||||
}
|
||||
[Nest] 45012 - 12/09/2025, 10:04:29 AM ERROR [CorrespondenceService] Failed to create correspondence: Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `document_number_counters_ibfk_3` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)
|
||||
[Nest] 45012 - 12/09/2025, 10:04:29 AM ERROR [ExceptionsHandler] QueryFailedError: Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `document_number_counters_ibfk_3` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)
|
||||
at Query.onResult (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\driver\mysql\MysqlQueryRunner.ts:248:33)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:36:14)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
query: 'INSERT INTO `document_number_counters`(`project_id`, `originator_organization_id`, `correspondence_type_id`, `discipline_id`, `current_year`, `last_number`, `version`) VALUES (?, ?, ?, ?, ?, ?, 1) RETURNING `discipline_id`, `last_number`, `version`',
|
||||
parameters: [
|
||||
1,
|
||||
41,
|
||||
1,
|
||||
0,
|
||||
2025,
|
||||
1
|
||||
],
|
||||
driverError: Error: Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `document_number_counters_ibfk_3` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)
|
||||
at Packet.asError (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packets\packet.js:740:17)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:29:26)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
code: 'ER_NO_REFERENCED_ROW_2',
|
||||
errno: 1452,
|
||||
sqlState: '23000',
|
||||
sqlMessage: 'Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `document_number_counters_ibfk_3` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)',
|
||||
sql: 'INSERT INTO `document_number_counters`(`project_id`, `originator_organization_id`, `correspondence_type_id`, `discipline_id`, `current_year`, `last_number`, `version`) VALUES (1, 41, 1, 0, 2025, 1, 1) RETURNING `discipline_id`, `last_number`, `version`'
|
||||
},
|
||||
code: 'ER_NO_REFERENCED_ROW_2',
|
||||
errno: 1452,
|
||||
sqlState: '23000',
|
||||
sqlMessage: 'Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `document_number_counters_ibfk_3` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)',
|
||||
sql: 'INSERT INTO `document_number_counters`(`project_id`, `originator_organization_id`, `correspondence_type_id`, `discipline_id`, `current_year`, `last_number`, `version`) VALUES (1, 41, 1, 0, 2025, 1, 1) RETURNING `discipline_id`, `last_number`, `version`'
|
||||
}
|
||||
FAIL test/phase3-workflow.e2e-spec.ts
|
||||
ΓùÅ Console
|
||||
|
||||
console.warn
|
||||
Skipping action test - no instanceId from submit
|
||||
|
||||
104 | // Skip if submit failed to get instanceId
|
||||
105 | if (!workflowInstanceId) {
|
||||
> 106 | console.warn('Skipping action test - no instanceId from submit');
|
||||
| ^
|
||||
107 | return;
|
||||
108 | }
|
||||
109 |
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:106:15)
|
||||
|
||||
● Phase 3 Workflow (E2E) › /correspondences (POST) - Create Document
|
||||
|
||||
expected 201 "Created", got 500 "Internal Server Error"
|
||||
|
||||
77 | details: { question: 'Testing Unified Workflow' },
|
||||
78 | })
|
||||
> 79 | .expect(201);
|
||||
| ^
|
||||
80 |
|
||||
81 | expect(response.body).toHaveProperty('id');
|
||||
82 | expect(response.body).toHaveProperty('correspondenceNumber');
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:79:8)
|
||||
----
|
||||
at Test._assertStatus (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:309:14)
|
||||
at ../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:365:13
|
||||
at Test._assertFunction (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:342:13)
|
||||
at Test.assert (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:195:23)
|
||||
at localAssert (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:138:14)
|
||||
at Server.<anonymous> (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:152:11)
|
||||
|
||||
● Phase 3 Workflow (E2E) › /correspondences/:id/submit (POST) - Submit to Workflow
|
||||
|
||||
expected 201 "Created", got 400 "Bad Request"
|
||||
|
||||
92 | note: 'Submitting for E2E test',
|
||||
93 | })
|
||||
> 94 | .expect(201);
|
||||
| ^
|
||||
95 |
|
||||
96 | expect(response.body).toHaveProperty('instanceId');
|
||||
97 | expect(response.body).toHaveProperty('currentState');
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:94:8)
|
||||
----
|
||||
at Test._assertStatus (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:309:14)
|
||||
at ../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:365:13
|
||||
at Test._assertFunction (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:342:13)
|
||||
at Test.assert (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:195:23)
|
||||
at localAssert (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:138:14)
|
||||
at Server.<anonymous> (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:152:11)
|
||||
|
||||
A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find leaks. Active timers can also cause this, ensure that .unref() was called on them.
|
||||
Test Suites: 1 failed, 2 passed, 3 total
|
||||
Tests: 2 failed, 3 passed, 5 total
|
||||
Snapshots: 0 total
|
||||
Time: 5.122 s
|
||||
Ran all test suites.
|
||||
ΓÇëELIFECYCLEΓÇë Command failed with exit code 1.
|
||||
@@ -1,220 +0,0 @@
|
||||
|
||||
> backend@1.5.1 test:e2e D:\nap-dms.lcbp3\backend
|
||||
> jest --config ./test/jest-e2e.json
|
||||
|
||||
PASS test/simple.e2e-spec.ts (7.012 s)
|
||||
PASS test/app.e2e-spec.ts (7.175 s)
|
||||
[Nest] 22264 - 12/09/2025, 10:27:45 AM ERROR [DocumentNumberingService] Error generating number for doc_num:1:1:0:2025
|
||||
[Nest] 22264 - 12/09/2025, 10:27:45 AM ERROR [DocumentNumberingService] QueryFailedError: Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `document_number_counters_ibfk_3` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)
|
||||
at Query.onResult (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\driver\mysql\MysqlQueryRunner.ts:248:33)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:36:14)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
query: 'INSERT INTO `document_number_counters`(`project_id`, `originator_organization_id`, `recipient_organization_id`, `correspondence_type_id`, `sub_type_id`, `rfa_type_id`, `discipline_id`, `current_year`, `last_number`, `version`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, 1) RETURNING `recipient_organization_id`, `sub_type_id`, `rfa_type_id`, `discipline_id`, `last_number`, `version`',
|
||||
parameters: [
|
||||
1,
|
||||
41,
|
||||
-1,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
2025,
|
||||
1
|
||||
],
|
||||
driverError: Error: Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `document_number_counters_ibfk_3` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)
|
||||
at Packet.asError (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packets\packet.js:740:17)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:29:26)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
code: 'ER_NO_REFERENCED_ROW_2',
|
||||
errno: 1452,
|
||||
sqlState: '23000',
|
||||
sqlMessage: 'Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `document_number_counters_ibfk_3` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)',
|
||||
sql: 'INSERT INTO `document_number_counters`(`project_id`, `originator_organization_id`, `recipient_organization_id`, `correspondence_type_id`, `sub_type_id`, `rfa_type_id`, `discipline_id`, `current_year`, `last_number`, `version`) VALUES (1, 41, -1, 1, 0, 0, 0, 2025, 1, 1) RETURNING `recipient_organization_id`, `sub_type_id`, `rfa_type_id`, `discipline_id`, `last_number`, `version`'
|
||||
},
|
||||
code: 'ER_NO_REFERENCED_ROW_2',
|
||||
errno: 1452,
|
||||
sqlState: '23000',
|
||||
sqlMessage: 'Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `document_number_counters_ibfk_3` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)',
|
||||
sql: 'INSERT INTO `document_number_counters`(`project_id`, `originator_organization_id`, `recipient_organization_id`, `correspondence_type_id`, `sub_type_id`, `rfa_type_id`, `discipline_id`, `current_year`, `last_number`, `version`) VALUES (1, 41, -1, 1, 0, 0, 0, 2025, 1, 1) RETURNING `recipient_organization_id`, `sub_type_id`, `rfa_type_id`, `discipline_id`, `last_number`, `version`'
|
||||
}
|
||||
[Nest] 22264 - 12/09/2025, 10:27:45 AM ERROR [DocumentNumberingService] Failed to log error
|
||||
[Nest] 22264 - 12/09/2025, 10:27:45 AM ERROR [DocumentNumberingService] QueryFailedError: Unknown column 'error_at' in 'RETURNING'
|
||||
at Query.onResult (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\driver\mysql\MysqlQueryRunner.ts:248:33)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:36:14)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
query: 'INSERT INTO `document_number_errors`(`id`, `counter_key`, `error_type`, `error_message`, `stack_trace`, `user_id`, `ip_address`, `context`, `error_at`) VALUES (DEFAULT, ?, ?, ?, ?, DEFAULT, DEFAULT, ?, DEFAULT) RETURNING `id`, `error_at`',
|
||||
parameters: [
|
||||
'doc_num:1:1:0:2025',
|
||||
'DB_ERROR',
|
||||
'Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `document_number_counters_ibfk_3` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)',
|
||||
'QueryFailedError: Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `document_number_counters_ibfk_3` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)\n at Query.onResult (D:\\nap-dms.lcbp3\\node_modules\\.pnpm\\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\\src\\driver\\mysql\\MysqlQueryRunner.ts:248:33)\n at Query.execute (D:\\nap-dms.lcbp3\\node_modules\\.pnpm\\mysql2@3.15.3\\node_modules\\mysql2\\lib\\commands\\command.js:36:14)\n at PoolConnection.handlePacket (D:\\nap-dms.lcbp3\\node_modules\\.pnpm\\mysql2@3.15.3\\node_modules\\mysql2\\lib\\base\\connection.js:477:34)\n at PacketParser.onPacket (D:\\nap-dms.lcbp3\\node_modules\\.pnpm\\mysql2@3.15.3\\node_modules\\mysql2\\lib\\base\\connection.js:93:12)\n at PacketParser.executeStart (D:\\nap-dms.lcbp3\\node_modules\\.pnpm\\mysql2@3.15.3\\node_modules\\mysql2\\lib\\packet_parser.js:75:16)\n at Socket.<anonymous> (D:\\nap-dms.lcbp3\\node_modules\\.pnpm\\mysql2@3.15.3\\node_modules\\mysql2\\lib\\base\\connection.js:100:25)\n at Socket.emit (node:events:519:28)\n at addChunk (node:internal/streams/readable:561:12)\n at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\n at Socket.Readable.push (node:internal/streams/readable:392:5)\n at TCP.onStreamRead (node:internal/stream_base_commons:189:23)\n at TCP.callbackTrampoline (node:internal/async_hooks:130:17)',
|
||||
'{"projectId":1,"originatorId":41,"typeId":1,"year":2025,"customTokens":{"TYPE_CODE":"RFA","ORG_CODE":"ORG"}}'
|
||||
],
|
||||
driverError: Error: Unknown column 'error_at' in 'RETURNING'
|
||||
at Packet.asError (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packets\packet.js:740:17)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:29:26)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
code: 'ER_BAD_FIELD_ERROR',
|
||||
errno: 1054,
|
||||
sqlState: '42S22',
|
||||
sqlMessage: "Unknown column 'error_at' in 'RETURNING'",
|
||||
sql: 'INSERT INTO `document_number_errors`(`id`, `counter_key`, `error_type`, `error_message`, `stack_trace`, `user_id`, `ip_address`, `context`, `error_at`) VALUES (DEFAULT, \'doc_num:1:1:0:2025\', \'DB_ERROR\', \'Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `document_number_counters_ibfk_3` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)\', \'QueryFailedError: Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `document_number_counters_ibfk_3` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)\\n at Query.onResult (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\\\\src\\\\driver\\\\mysql\\\\MysqlQueryRunner.ts:248:33)\\n at Query.execute (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\mysql2@3.15.3\\\\node_modules\\\\mysql2\\\\lib\\\\commands\\\\command.js:36:14)\\n at PoolConnection.handlePacket (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\mysql2@3.15.3\\\\node_modules\\\\mysql2\\\\lib\\\\base\\\\connection.js:477:34)\\n at PacketParser.onPacket (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\mysql2@3.15.3\\\\node_modules\\\\mysql2\\\\lib\\\\base\\\\connection.js:93:12)\\n at PacketParser.executeStart (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\mysql2@3.15.3\\\\node_modules\\\\mysql2\\\\lib\\\\packet_parser.js:75:16)\\n at Socket.<anonymous> (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\mysql2@3.15.3\\\\node_modules\\\\mysql2\\\\lib\\\\base\\\\connection.js:100:25)\\n at Socket.emit (node:events:519:28)\\n at addChunk (node:internal/streams/readable:561:12)\\n at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\\n at Socket.Readable.push (node:internal/streams/readable:392:5)\\n at TCP.onStreamRead (node:internal/stream_base_commons:189:23)\\n at TCP.callbackTrampoline (node:internal/async_hooks:130:17)\', DEFAULT, DEFAULT, \'{\\"projectId\\":1,\\"originatorId\\":41,\\"typeId\\":1,\\"year\\":2025,\\"customTokens\\":{\\"TYPE_CODE\\":\\"RFA\\",\\"ORG_CODE\\":\\"ORG\\"}}\', DEFAULT) RETURNING `id`, `error_at`'
|
||||
},
|
||||
code: 'ER_BAD_FIELD_ERROR',
|
||||
errno: 1054,
|
||||
sqlState: '42S22',
|
||||
sqlMessage: "Unknown column 'error_at' in 'RETURNING'",
|
||||
sql: 'INSERT INTO `document_number_errors`(`id`, `counter_key`, `error_type`, `error_message`, `stack_trace`, `user_id`, `ip_address`, `context`, `error_at`) VALUES (DEFAULT, \'doc_num:1:1:0:2025\', \'DB_ERROR\', \'Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `document_number_counters_ibfk_3` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)\', \'QueryFailedError: Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `document_number_counters_ibfk_3` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)\\n at Query.onResult (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\\\\src\\\\driver\\\\mysql\\\\MysqlQueryRunner.ts:248:33)\\n at Query.execute (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\mysql2@3.15.3\\\\node_modules\\\\mysql2\\\\lib\\\\commands\\\\command.js:36:14)\\n at PoolConnection.handlePacket (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\mysql2@3.15.3\\\\node_modules\\\\mysql2\\\\lib\\\\base\\\\connection.js:477:34)\\n at PacketParser.onPacket (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\mysql2@3.15.3\\\\node_modules\\\\mysql2\\\\lib\\\\base\\\\connection.js:93:12)\\n at PacketParser.executeStart (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\mysql2@3.15.3\\\\node_modules\\\\mysql2\\\\lib\\\\packet_parser.js:75:16)\\n at Socket.<anonymous> (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\mysql2@3.15.3\\\\node_modules\\\\mysql2\\\\lib\\\\base\\\\connection.js:100:25)\\n at Socket.emit (node:events:519:28)\\n at addChunk (node:internal/streams/readable:561:12)\\n at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\\n at Socket.Readable.push (node:internal/streams/readable:392:5)\\n at TCP.onStreamRead (node:internal/stream_base_commons:189:23)\\n at TCP.callbackTrampoline (node:internal/async_hooks:130:17)\', DEFAULT, DEFAULT, \'{\\"projectId\\":1,\\"originatorId\\":41,\\"typeId\\":1,\\"year\\":2025,\\"customTokens\\":{\\"TYPE_CODE\\":\\"RFA\\",\\"ORG_CODE\\":\\"ORG\\"}}\', DEFAULT) RETURNING `id`, `error_at`'
|
||||
}
|
||||
[Nest] 22264 - 12/09/2025, 10:27:45 AM ERROR [CorrespondenceService] Failed to create correspondence: Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `document_number_counters_ibfk_3` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)
|
||||
[Nest] 22264 - 12/09/2025, 10:27:45 AM ERROR [ExceptionsHandler] QueryFailedError: Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `document_number_counters_ibfk_3` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)
|
||||
at Query.onResult (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\driver\mysql\MysqlQueryRunner.ts:248:33)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:36:14)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
query: 'INSERT INTO `document_number_counters`(`project_id`, `originator_organization_id`, `recipient_organization_id`, `correspondence_type_id`, `sub_type_id`, `rfa_type_id`, `discipline_id`, `current_year`, `last_number`, `version`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, 1) RETURNING `recipient_organization_id`, `sub_type_id`, `rfa_type_id`, `discipline_id`, `last_number`, `version`',
|
||||
parameters: [
|
||||
1,
|
||||
41,
|
||||
-1,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
2025,
|
||||
1
|
||||
],
|
||||
driverError: Error: Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `document_number_counters_ibfk_3` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)
|
||||
at Packet.asError (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packets\packet.js:740:17)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:29:26)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
code: 'ER_NO_REFERENCED_ROW_2',
|
||||
errno: 1452,
|
||||
sqlState: '23000',
|
||||
sqlMessage: 'Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `document_number_counters_ibfk_3` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)',
|
||||
sql: 'INSERT INTO `document_number_counters`(`project_id`, `originator_organization_id`, `recipient_organization_id`, `correspondence_type_id`, `sub_type_id`, `rfa_type_id`, `discipline_id`, `current_year`, `last_number`, `version`) VALUES (1, 41, -1, 1, 0, 0, 0, 2025, 1, 1) RETURNING `recipient_organization_id`, `sub_type_id`, `rfa_type_id`, `discipline_id`, `last_number`, `version`'
|
||||
},
|
||||
code: 'ER_NO_REFERENCED_ROW_2',
|
||||
errno: 1452,
|
||||
sqlState: '23000',
|
||||
sqlMessage: 'Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `document_number_counters_ibfk_3` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)',
|
||||
sql: 'INSERT INTO `document_number_counters`(`project_id`, `originator_organization_id`, `recipient_organization_id`, `correspondence_type_id`, `sub_type_id`, `rfa_type_id`, `discipline_id`, `current_year`, `last_number`, `version`) VALUES (1, 41, -1, 1, 0, 0, 0, 2025, 1, 1) RETURNING `recipient_organization_id`, `sub_type_id`, `rfa_type_id`, `discipline_id`, `last_number`, `version`'
|
||||
}
|
||||
FAIL test/phase3-workflow.e2e-spec.ts (7.412 s)
|
||||
ΓùÅ Console
|
||||
|
||||
console.warn
|
||||
Skipping action test - no instanceId from submit
|
||||
|
||||
104 | // Skip if submit failed to get instanceId
|
||||
105 | if (!workflowInstanceId) {
|
||||
> 106 | console.warn('Skipping action test - no instanceId from submit');
|
||||
| ^
|
||||
107 | return;
|
||||
108 | }
|
||||
109 |
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:106:15)
|
||||
|
||||
● Phase 3 Workflow (E2E) › /correspondences (POST) - Create Document
|
||||
|
||||
expected 201 "Created", got 500 "Internal Server Error"
|
||||
|
||||
77 | details: { question: 'Testing Unified Workflow' },
|
||||
78 | })
|
||||
> 79 | .expect(201);
|
||||
| ^
|
||||
80 |
|
||||
81 | expect(response.body).toHaveProperty('id');
|
||||
82 | expect(response.body).toHaveProperty('correspondenceNumber');
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:79:8)
|
||||
----
|
||||
at Test._assertStatus (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:309:14)
|
||||
at ../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:365:13
|
||||
at Test._assertFunction (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:342:13)
|
||||
at Test.assert (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:195:23)
|
||||
at localAssert (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:138:14)
|
||||
at Server.<anonymous> (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:152:11)
|
||||
|
||||
● Phase 3 Workflow (E2E) › /correspondences/:id/submit (POST) - Submit to Workflow
|
||||
|
||||
expected 201 "Created", got 400 "Bad Request"
|
||||
|
||||
92 | note: 'Submitting for E2E test',
|
||||
93 | })
|
||||
> 94 | .expect(201);
|
||||
| ^
|
||||
95 |
|
||||
96 | expect(response.body).toHaveProperty('instanceId');
|
||||
97 | expect(response.body).toHaveProperty('currentState');
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:94:8)
|
||||
----
|
||||
at Test._assertStatus (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:309:14)
|
||||
at ../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:365:13
|
||||
at Test._assertFunction (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:342:13)
|
||||
at Test.assert (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:195:23)
|
||||
at localAssert (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:138:14)
|
||||
at Server.<anonymous> (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:152:11)
|
||||
|
||||
A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find leaks. Active timers can also cause this, ensure that .unref() was called on them.
|
||||
Test Suites: 1 failed, 2 passed, 3 total
|
||||
Tests: 2 failed, 3 passed, 5 total
|
||||
Snapshots: 0 total
|
||||
Time: 8.723 s
|
||||
Ran all test suites.
|
||||
ΓÇëELIFECYCLEΓÇë Command failed with exit code 1.
|
||||
@@ -1,220 +0,0 @@
|
||||
|
||||
> backend@1.5.1 test:e2e D:\nap-dms.lcbp3\backend
|
||||
> jest --config ./test/jest-e2e.json
|
||||
|
||||
PASS test/simple.e2e-spec.ts
|
||||
PASS test/app.e2e-spec.ts
|
||||
[Nest] 44520 - 12/09/2025, 11:16:08 AM ERROR [DocumentNumberingService] Error generating number for doc_num:1:1:0:2025
|
||||
[Nest] 44520 - 12/09/2025, 11:16:08 AM ERROR [DocumentNumberingService] QueryFailedError: Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `fk_recipient_when_not_all` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)
|
||||
at Query.onResult (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\driver\mysql\MysqlQueryRunner.ts:248:33)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:36:14)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
query: 'INSERT INTO `document_number_counters`(`project_id`, `originator_organization_id`, `recipient_organization_id`, `correspondence_type_id`, `sub_type_id`, `rfa_type_id`, `discipline_id`, `current_year`, `last_number`, `version`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, 1) RETURNING `recipient_organization_id`, `sub_type_id`, `rfa_type_id`, `discipline_id`, `last_number`, `version`',
|
||||
parameters: [
|
||||
1,
|
||||
41,
|
||||
-1,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
2025,
|
||||
1
|
||||
],
|
||||
driverError: Error: Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `fk_recipient_when_not_all` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)
|
||||
at Packet.asError (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packets\packet.js:740:17)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:29:26)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
code: 'ER_NO_REFERENCED_ROW_2',
|
||||
errno: 1452,
|
||||
sqlState: '23000',
|
||||
sqlMessage: 'Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `fk_recipient_when_not_all` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)',
|
||||
sql: 'INSERT INTO `document_number_counters`(`project_id`, `originator_organization_id`, `recipient_organization_id`, `correspondence_type_id`, `sub_type_id`, `rfa_type_id`, `discipline_id`, `current_year`, `last_number`, `version`) VALUES (1, 41, -1, 1, 0, 0, 0, 2025, 1, 1) RETURNING `recipient_organization_id`, `sub_type_id`, `rfa_type_id`, `discipline_id`, `last_number`, `version`'
|
||||
},
|
||||
code: 'ER_NO_REFERENCED_ROW_2',
|
||||
errno: 1452,
|
||||
sqlState: '23000',
|
||||
sqlMessage: 'Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `fk_recipient_when_not_all` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)',
|
||||
sql: 'INSERT INTO `document_number_counters`(`project_id`, `originator_organization_id`, `recipient_organization_id`, `correspondence_type_id`, `sub_type_id`, `rfa_type_id`, `discipline_id`, `current_year`, `last_number`, `version`) VALUES (1, 41, -1, 1, 0, 0, 0, 2025, 1, 1) RETURNING `recipient_organization_id`, `sub_type_id`, `rfa_type_id`, `discipline_id`, `last_number`, `version`'
|
||||
}
|
||||
[Nest] 44520 - 12/09/2025, 11:16:08 AM ERROR [DocumentNumberingService] Failed to log error
|
||||
[Nest] 44520 - 12/09/2025, 11:16:08 AM ERROR [DocumentNumberingService] QueryFailedError: Unknown column 'error_at' in 'RETURNING'
|
||||
at Query.onResult (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\driver\mysql\MysqlQueryRunner.ts:248:33)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:36:14)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
query: 'INSERT INTO `document_number_errors`(`id`, `counter_key`, `error_type`, `error_message`, `stack_trace`, `user_id`, `ip_address`, `context`, `error_at`) VALUES (DEFAULT, ?, ?, ?, ?, DEFAULT, DEFAULT, ?, DEFAULT) RETURNING `id`, `error_at`',
|
||||
parameters: [
|
||||
'doc_num:1:1:0:2025',
|
||||
'DB_ERROR',
|
||||
'Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `fk_recipient_when_not_all` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)',
|
||||
'QueryFailedError: Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `fk_recipient_when_not_all` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)\n at Query.onResult (D:\\nap-dms.lcbp3\\node_modules\\.pnpm\\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\\src\\driver\\mysql\\MysqlQueryRunner.ts:248:33)\n at Query.execute (D:\\nap-dms.lcbp3\\node_modules\\.pnpm\\mysql2@3.15.3\\node_modules\\mysql2\\lib\\commands\\command.js:36:14)\n at PoolConnection.handlePacket (D:\\nap-dms.lcbp3\\node_modules\\.pnpm\\mysql2@3.15.3\\node_modules\\mysql2\\lib\\base\\connection.js:477:34)\n at PacketParser.onPacket (D:\\nap-dms.lcbp3\\node_modules\\.pnpm\\mysql2@3.15.3\\node_modules\\mysql2\\lib\\base\\connection.js:93:12)\n at PacketParser.executeStart (D:\\nap-dms.lcbp3\\node_modules\\.pnpm\\mysql2@3.15.3\\node_modules\\mysql2\\lib\\packet_parser.js:75:16)\n at Socket.<anonymous> (D:\\nap-dms.lcbp3\\node_modules\\.pnpm\\mysql2@3.15.3\\node_modules\\mysql2\\lib\\base\\connection.js:100:25)\n at Socket.emit (node:events:519:28)\n at addChunk (node:internal/streams/readable:561:12)\n at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\n at Socket.Readable.push (node:internal/streams/readable:392:5)\n at TCP.onStreamRead (node:internal/stream_base_commons:189:23)\n at TCP.callbackTrampoline (node:internal/async_hooks:130:17)',
|
||||
'{"projectId":1,"originatorId":41,"typeId":1,"year":2025,"customTokens":{"TYPE_CODE":"RFA","ORG_CODE":"ORG"}}'
|
||||
],
|
||||
driverError: Error: Unknown column 'error_at' in 'RETURNING'
|
||||
at Packet.asError (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packets\packet.js:740:17)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:29:26)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
code: 'ER_BAD_FIELD_ERROR',
|
||||
errno: 1054,
|
||||
sqlState: '42S22',
|
||||
sqlMessage: "Unknown column 'error_at' in 'RETURNING'",
|
||||
sql: 'INSERT INTO `document_number_errors`(`id`, `counter_key`, `error_type`, `error_message`, `stack_trace`, `user_id`, `ip_address`, `context`, `error_at`) VALUES (DEFAULT, \'doc_num:1:1:0:2025\', \'DB_ERROR\', \'Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `fk_recipient_when_not_all` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)\', \'QueryFailedError: Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `fk_recipient_when_not_all` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)\\n at Query.onResult (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\\\\src\\\\driver\\\\mysql\\\\MysqlQueryRunner.ts:248:33)\\n at Query.execute (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\mysql2@3.15.3\\\\node_modules\\\\mysql2\\\\lib\\\\commands\\\\command.js:36:14)\\n at PoolConnection.handlePacket (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\mysql2@3.15.3\\\\node_modules\\\\mysql2\\\\lib\\\\base\\\\connection.js:477:34)\\n at PacketParser.onPacket (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\mysql2@3.15.3\\\\node_modules\\\\mysql2\\\\lib\\\\base\\\\connection.js:93:12)\\n at PacketParser.executeStart (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\mysql2@3.15.3\\\\node_modules\\\\mysql2\\\\lib\\\\packet_parser.js:75:16)\\n at Socket.<anonymous> (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\mysql2@3.15.3\\\\node_modules\\\\mysql2\\\\lib\\\\base\\\\connection.js:100:25)\\n at Socket.emit (node:events:519:28)\\n at addChunk (node:internal/streams/readable:561:12)\\n at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\\n at Socket.Readable.push (node:internal/streams/readable:392:5)\\n at TCP.onStreamRead (node:internal/stream_base_commons:189:23)\\n at TCP.callbackTrampoline (node:internal/async_hooks:130:17)\', DEFAULT, DEFAULT, \'{\\"projectId\\":1,\\"originatorId\\":41,\\"typeId\\":1,\\"year\\":2025,\\"customTokens\\":{\\"TYPE_CODE\\":\\"RFA\\",\\"ORG_CODE\\":\\"ORG\\"}}\', DEFAULT) RETURNING `id`, `error_at`'
|
||||
},
|
||||
code: 'ER_BAD_FIELD_ERROR',
|
||||
errno: 1054,
|
||||
sqlState: '42S22',
|
||||
sqlMessage: "Unknown column 'error_at' in 'RETURNING'",
|
||||
sql: 'INSERT INTO `document_number_errors`(`id`, `counter_key`, `error_type`, `error_message`, `stack_trace`, `user_id`, `ip_address`, `context`, `error_at`) VALUES (DEFAULT, \'doc_num:1:1:0:2025\', \'DB_ERROR\', \'Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `fk_recipient_when_not_all` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)\', \'QueryFailedError: Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `fk_recipient_when_not_all` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)\\n at Query.onResult (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\\\\src\\\\driver\\\\mysql\\\\MysqlQueryRunner.ts:248:33)\\n at Query.execute (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\mysql2@3.15.3\\\\node_modules\\\\mysql2\\\\lib\\\\commands\\\\command.js:36:14)\\n at PoolConnection.handlePacket (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\mysql2@3.15.3\\\\node_modules\\\\mysql2\\\\lib\\\\base\\\\connection.js:477:34)\\n at PacketParser.onPacket (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\mysql2@3.15.3\\\\node_modules\\\\mysql2\\\\lib\\\\base\\\\connection.js:93:12)\\n at PacketParser.executeStart (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\mysql2@3.15.3\\\\node_modules\\\\mysql2\\\\lib\\\\packet_parser.js:75:16)\\n at Socket.<anonymous> (D:\\\\nap-dms.lcbp3\\\\node_modules\\\\.pnpm\\\\mysql2@3.15.3\\\\node_modules\\\\mysql2\\\\lib\\\\base\\\\connection.js:100:25)\\n at Socket.emit (node:events:519:28)\\n at addChunk (node:internal/streams/readable:561:12)\\n at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\\n at Socket.Readable.push (node:internal/streams/readable:392:5)\\n at TCP.onStreamRead (node:internal/stream_base_commons:189:23)\\n at TCP.callbackTrampoline (node:internal/async_hooks:130:17)\', DEFAULT, DEFAULT, \'{\\"projectId\\":1,\\"originatorId\\":41,\\"typeId\\":1,\\"year\\":2025,\\"customTokens\\":{\\"TYPE_CODE\\":\\"RFA\\",\\"ORG_CODE\\":\\"ORG\\"}}\', DEFAULT) RETURNING `id`, `error_at`'
|
||||
}
|
||||
[Nest] 44520 - 12/09/2025, 11:16:08 AM ERROR [CorrespondenceService] Failed to create correspondence: Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `fk_recipient_when_not_all` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)
|
||||
[Nest] 44520 - 12/09/2025, 11:16:08 AM ERROR [ExceptionsHandler] QueryFailedError: Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `fk_recipient_when_not_all` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)
|
||||
at Query.onResult (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\driver\mysql\MysqlQueryRunner.ts:248:33)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:36:14)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
query: 'INSERT INTO `document_number_counters`(`project_id`, `originator_organization_id`, `recipient_organization_id`, `correspondence_type_id`, `sub_type_id`, `rfa_type_id`, `discipline_id`, `current_year`, `last_number`, `version`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, 1) RETURNING `recipient_organization_id`, `sub_type_id`, `rfa_type_id`, `discipline_id`, `last_number`, `version`',
|
||||
parameters: [
|
||||
1,
|
||||
41,
|
||||
-1,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
2025,
|
||||
1
|
||||
],
|
||||
driverError: Error: Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `fk_recipient_when_not_all` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)
|
||||
at Packet.asError (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packets\packet.js:740:17)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:29:26)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
code: 'ER_NO_REFERENCED_ROW_2',
|
||||
errno: 1452,
|
||||
sqlState: '23000',
|
||||
sqlMessage: 'Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `fk_recipient_when_not_all` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)',
|
||||
sql: 'INSERT INTO `document_number_counters`(`project_id`, `originator_organization_id`, `recipient_organization_id`, `correspondence_type_id`, `sub_type_id`, `rfa_type_id`, `discipline_id`, `current_year`, `last_number`, `version`) VALUES (1, 41, -1, 1, 0, 0, 0, 2025, 1, 1) RETURNING `recipient_organization_id`, `sub_type_id`, `rfa_type_id`, `discipline_id`, `last_number`, `version`'
|
||||
},
|
||||
code: 'ER_NO_REFERENCED_ROW_2',
|
||||
errno: 1452,
|
||||
sqlState: '23000',
|
||||
sqlMessage: 'Cannot add or update a child row: a foreign key constraint fails (`lcbp3_dev`.`document_number_counters`, CONSTRAINT `fk_recipient_when_not_all` FOREIGN KEY (`recipient_organization_id`) REFERENCES `organizations` (`id`) ON DELETE CASCADE)',
|
||||
sql: 'INSERT INTO `document_number_counters`(`project_id`, `originator_organization_id`, `recipient_organization_id`, `correspondence_type_id`, `sub_type_id`, `rfa_type_id`, `discipline_id`, `current_year`, `last_number`, `version`) VALUES (1, 41, -1, 1, 0, 0, 0, 2025, 1, 1) RETURNING `recipient_organization_id`, `sub_type_id`, `rfa_type_id`, `discipline_id`, `last_number`, `version`'
|
||||
}
|
||||
FAIL test/phase3-workflow.e2e-spec.ts
|
||||
ΓùÅ Console
|
||||
|
||||
console.warn
|
||||
Skipping action test - no instanceId from submit
|
||||
|
||||
104 | // Skip if submit failed to get instanceId
|
||||
105 | if (!workflowInstanceId) {
|
||||
> 106 | console.warn('Skipping action test - no instanceId from submit');
|
||||
| ^
|
||||
107 | return;
|
||||
108 | }
|
||||
109 |
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:106:15)
|
||||
|
||||
● Phase 3 Workflow (E2E) › /correspondences (POST) - Create Document
|
||||
|
||||
expected 201 "Created", got 500 "Internal Server Error"
|
||||
|
||||
77 | details: { question: 'Testing Unified Workflow' },
|
||||
78 | })
|
||||
> 79 | .expect(201);
|
||||
| ^
|
||||
80 |
|
||||
81 | expect(response.body).toHaveProperty('id');
|
||||
82 | expect(response.body).toHaveProperty('correspondenceNumber');
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:79:8)
|
||||
----
|
||||
at Test._assertStatus (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:309:14)
|
||||
at ../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:365:13
|
||||
at Test._assertFunction (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:342:13)
|
||||
at Test.assert (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:195:23)
|
||||
at localAssert (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:138:14)
|
||||
at Server.<anonymous> (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:152:11)
|
||||
|
||||
● Phase 3 Workflow (E2E) › /correspondences/:id/submit (POST) - Submit to Workflow
|
||||
|
||||
expected 201 "Created", got 400 "Bad Request"
|
||||
|
||||
92 | note: 'Submitting for E2E test',
|
||||
93 | })
|
||||
> 94 | .expect(201);
|
||||
| ^
|
||||
95 |
|
||||
96 | expect(response.body).toHaveProperty('instanceId');
|
||||
97 | expect(response.body).toHaveProperty('currentState');
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:94:8)
|
||||
----
|
||||
at Test._assertStatus (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:309:14)
|
||||
at ../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:365:13
|
||||
at Test._assertFunction (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:342:13)
|
||||
at Test.assert (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:195:23)
|
||||
at localAssert (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:138:14)
|
||||
at Server.<anonymous> (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:152:11)
|
||||
|
||||
A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find leaks. Active timers can also cause this, ensure that .unref() was called on them.
|
||||
Test Suites: 1 failed, 2 passed, 3 total
|
||||
Tests: 2 failed, 3 passed, 5 total
|
||||
Snapshots: 0 total
|
||||
Time: 5.786 s, estimated 8 s
|
||||
Ran all test suites.
|
||||
ΓÇëELIFECYCLEΓÇë Command failed with exit code 1.
|
||||
@@ -1,111 +0,0 @@
|
||||
|
||||
> backend@1.5.1 test:e2e D:\nap-dms.lcbp3\backend
|
||||
> jest --config ./test/jest-e2e.json
|
||||
|
||||
PASS test/simple.e2e-spec.ts
|
||||
PASS test/app.e2e-spec.ts
|
||||
[Nest] 25968 - 12/09/2025, 11:19:28 AM ERROR [DocumentNumberingService] Failed to log audit
|
||||
[Nest] 25968 - 12/09/2025, 11:19:28 AM ERROR [DocumentNumberingService] QueryFailedError: Unknown column 'generated_at' in 'RETURNING'
|
||||
at Query.onResult (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\driver\mysql\MysqlQueryRunner.ts:248:33)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:36:14)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
query: 'INSERT INTO `document_number_audit`(`id`, `generated_number`, `counter_key`, `template_used`, `sequence_number`, `user_id`, `ip_address`, `retry_count`, `lock_wait_ms`, `generated_at`) VALUES (DEFAULT, ?, ?, ?, ?, DEFAULT, DEFAULT, ?, ?, DEFAULT) RETURNING `id`, `retry_count`, `generated_at`',
|
||||
parameters: [
|
||||
'ผรม.1-ผรม.1-0001-2568',
|
||||
'doc_num:1:1:0:2025',
|
||||
'{ORG}-{ORG}-{SEQ:4}-{YEAR}',
|
||||
1,
|
||||
0,
|
||||
0
|
||||
],
|
||||
driverError: Error: Unknown column 'generated_at' in 'RETURNING'
|
||||
at Packet.asError (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packets\packet.js:740:17)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:29:26)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
code: 'ER_BAD_FIELD_ERROR',
|
||||
errno: 1054,
|
||||
sqlState: '42S22',
|
||||
sqlMessage: "Unknown column 'generated_at' in 'RETURNING'",
|
||||
sql: "INSERT INTO `document_number_audit`(`id`, `generated_number`, `counter_key`, `template_used`, `sequence_number`, `user_id`, `ip_address`, `retry_count`, `lock_wait_ms`, `generated_at`) VALUES (DEFAULT, 'ผรม.1-ผรม.1-0001-2568', 'doc_num:1:1:0:2025', '{ORG}-{ORG}-{SEQ:4}-{YEAR}', 1, DEFAULT, DEFAULT, 0, 0, DEFAULT) RETURNING `id`, `retry_count`, `generated_at`"
|
||||
},
|
||||
code: 'ER_BAD_FIELD_ERROR',
|
||||
errno: 1054,
|
||||
sqlState: '42S22',
|
||||
sqlMessage: "Unknown column 'generated_at' in 'RETURNING'",
|
||||
sql: "INSERT INTO `document_number_audit`(`id`, `generated_number`, `counter_key`, `template_used`, `sequence_number`, `user_id`, `ip_address`, `retry_count`, `lock_wait_ms`, `generated_at`) VALUES (DEFAULT, 'ผรม.1-ผรม.1-0001-2568', 'doc_num:1:1:0:2025', '{ORG}-{ORG}-{SEQ:4}-{YEAR}', 1, DEFAULT, DEFAULT, 0, 0, DEFAULT) RETURNING `id`, `retry_count`, `generated_at`"
|
||||
}
|
||||
[Nest] 25968 - 12/09/2025, 11:19:28 AM ERROR [WorkflowEngineService] Transition Failed for 1215d0aa-453f-46dc-845d-0488a0213c4a: Cannot read properties of undefined (reading 'roles')
|
||||
[Nest] 25968 - 12/09/2025, 11:19:28 AM ERROR [CorrespondenceWorkflowService] Failed to submit workflow: TypeError: Cannot read properties of undefined (reading 'roles')
|
||||
[Nest] 25968 - 12/09/2025, 11:19:28 AM ERROR [ExceptionsHandler] TypeError: Cannot read properties of undefined (reading 'roles')
|
||||
at WorkflowDslService.checkRequirements (D:\nap-dms.lcbp3\backend\src\modules\workflow-engine\workflow-dsl.service.ts:219:13)
|
||||
at WorkflowDslService.evaluate (D:\nap-dms.lcbp3\backend\src\modules\workflow-engine\workflow-dsl.service.ts:178:10)
|
||||
at WorkflowEngineService.processTransition (D:\nap-dms.lcbp3\backend\src\modules\workflow-engine\workflow-engine.service.ts:259:42)
|
||||
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
||||
at CorrespondenceWorkflowService.submitWorkflow (D:\nap-dms.lcbp3\backend\src\modules\correspondence\correspondence-workflow.service.ts:72:32)
|
||||
FAIL test/phase3-workflow.e2e-spec.ts
|
||||
ΓùÅ Console
|
||||
|
||||
console.log
|
||||
Created Correspondence ID: 3
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:84:13)
|
||||
|
||||
console.warn
|
||||
Skipping action test - no instanceId from submit
|
||||
|
||||
104 | // Skip if submit failed to get instanceId
|
||||
105 | if (!workflowInstanceId) {
|
||||
> 106 | console.warn('Skipping action test - no instanceId from submit');
|
||||
| ^
|
||||
107 | return;
|
||||
108 | }
|
||||
109 |
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:106:15)
|
||||
|
||||
● Phase 3 Workflow (E2E) › /correspondences/:id/submit (POST) - Submit to Workflow
|
||||
|
||||
expected 201 "Created", got 500 "Internal Server Error"
|
||||
|
||||
92 | note: 'Submitting for E2E test',
|
||||
93 | })
|
||||
> 94 | .expect(201);
|
||||
| ^
|
||||
95 |
|
||||
96 | expect(response.body).toHaveProperty('instanceId');
|
||||
97 | expect(response.body).toHaveProperty('currentState');
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:94:8)
|
||||
----
|
||||
at Test._assertStatus (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:309:14)
|
||||
at ../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:365:13
|
||||
at Test._assertFunction (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:342:13)
|
||||
at Test.assert (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:195:23)
|
||||
at localAssert (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:138:14)
|
||||
at Server.<anonymous> (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:152:11)
|
||||
|
||||
A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find leaks. Active timers can also cause this, ensure that .unref() was called on them.
|
||||
Test Suites: 1 failed, 2 passed, 3 total
|
||||
Tests: 1 failed, 4 passed, 5 total
|
||||
Snapshots: 0 total
|
||||
Time: 5.439 s
|
||||
Ran all test suites.
|
||||
ΓÇëELIFECYCLEΓÇë Command failed with exit code 1.
|
||||
@@ -1,111 +0,0 @@
|
||||
|
||||
> backend@1.5.1 test:e2e D:\nap-dms.lcbp3\backend
|
||||
> jest --config ./test/jest-e2e.json
|
||||
|
||||
PASS test/simple.e2e-spec.ts
|
||||
PASS test/app.e2e-spec.ts
|
||||
[Nest] 35280 - 12/09/2025, 11:24:24 AM ERROR [DocumentNumberingService] Failed to log audit
|
||||
[Nest] 35280 - 12/09/2025, 11:24:24 AM ERROR [DocumentNumberingService] QueryFailedError: Unknown column 'generated_at' in 'RETURNING'
|
||||
at Query.onResult (D:\nap-dms.lcbp3\node_modules\.pnpm\typeorm@0.3.27_ioredis@5.8._cb81dfd56f1203fe00eb0fec5dfcce08\src\driver\mysql\MysqlQueryRunner.ts:248:33)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:36:14)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
query: 'INSERT INTO `document_number_audit`(`id`, `generated_number`, `counter_key`, `template_used`, `sequence_number`, `user_id`, `ip_address`, `retry_count`, `lock_wait_ms`, `generated_at`) VALUES (DEFAULT, ?, ?, ?, ?, DEFAULT, DEFAULT, ?, ?, DEFAULT) RETURNING `id`, `retry_count`, `generated_at`',
|
||||
parameters: [
|
||||
'ผรม.1-ผรม.1-0002-2568',
|
||||
'doc_num:1:1:0:2025',
|
||||
'{ORG}-{ORG}-{SEQ:4}-{YEAR}',
|
||||
2,
|
||||
0,
|
||||
0
|
||||
],
|
||||
driverError: Error: Unknown column 'generated_at' in 'RETURNING'
|
||||
at Packet.asError (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packets\packet.js:740:17)
|
||||
at Query.execute (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\commands\command.js:29:26)
|
||||
at PoolConnection.handlePacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:477:34)
|
||||
at PacketParser.onPacket (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:93:12)
|
||||
at PacketParser.executeStart (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\packet_parser.js:75:16)
|
||||
at Socket.<anonymous> (D:\nap-dms.lcbp3\node_modules\.pnpm\mysql2@3.15.3\node_modules\mysql2\lib\base\connection.js:100:25)
|
||||
at Socket.emit (node:events:519:28)
|
||||
at addChunk (node:internal/streams/readable:561:12)
|
||||
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
|
||||
at Socket.Readable.push (node:internal/streams/readable:392:5)
|
||||
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
|
||||
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
|
||||
code: 'ER_BAD_FIELD_ERROR',
|
||||
errno: 1054,
|
||||
sqlState: '42S22',
|
||||
sqlMessage: "Unknown column 'generated_at' in 'RETURNING'",
|
||||
sql: "INSERT INTO `document_number_audit`(`id`, `generated_number`, `counter_key`, `template_used`, `sequence_number`, `user_id`, `ip_address`, `retry_count`, `lock_wait_ms`, `generated_at`) VALUES (DEFAULT, 'ผรม.1-ผรม.1-0002-2568', 'doc_num:1:1:0:2025', '{ORG}-{ORG}-{SEQ:4}-{YEAR}', 2, DEFAULT, DEFAULT, 0, 0, DEFAULT) RETURNING `id`, `retry_count`, `generated_at`"
|
||||
},
|
||||
code: 'ER_BAD_FIELD_ERROR',
|
||||
errno: 1054,
|
||||
sqlState: '42S22',
|
||||
sqlMessage: "Unknown column 'generated_at' in 'RETURNING'",
|
||||
sql: "INSERT INTO `document_number_audit`(`id`, `generated_number`, `counter_key`, `template_used`, `sequence_number`, `user_id`, `ip_address`, `retry_count`, `lock_wait_ms`, `generated_at`) VALUES (DEFAULT, 'ผรม.1-ผรม.1-0002-2568', 'doc_num:1:1:0:2025', '{ORG}-{ORG}-{SEQ:4}-{YEAR}', 2, DEFAULT, DEFAULT, 0, 0, DEFAULT) RETURNING `id`, `retry_count`, `generated_at`"
|
||||
}
|
||||
[Nest] 35280 - 12/09/2025, 11:24:25 AM ERROR [WorkflowEngineService] Transition Failed for 3a51f630-c4fc-4fb4-8c2b-f1150195d8bd: Cannot read properties of undefined (reading 'roles')
|
||||
[Nest] 35280 - 12/09/2025, 11:24:25 AM ERROR [CorrespondenceWorkflowService] Failed to submit workflow: TypeError: Cannot read properties of undefined (reading 'roles')
|
||||
[Nest] 35280 - 12/09/2025, 11:24:25 AM ERROR [ExceptionsHandler] TypeError: Cannot read properties of undefined (reading 'roles')
|
||||
at WorkflowDslService.checkRequirements (D:\nap-dms.lcbp3\backend\src\modules\workflow-engine\workflow-dsl.service.ts:219:13)
|
||||
at WorkflowDslService.evaluate (D:\nap-dms.lcbp3\backend\src\modules\workflow-engine\workflow-dsl.service.ts:178:10)
|
||||
at WorkflowEngineService.processTransition (D:\nap-dms.lcbp3\backend\src\modules\workflow-engine\workflow-engine.service.ts:259:42)
|
||||
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
||||
at CorrespondenceWorkflowService.submitWorkflow (D:\nap-dms.lcbp3\backend\src\modules\correspondence\correspondence-workflow.service.ts:73:32)
|
||||
FAIL test/phase3-workflow.e2e-spec.ts
|
||||
ΓùÅ Console
|
||||
|
||||
console.log
|
||||
Created Correspondence ID: 4
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:84:13)
|
||||
|
||||
console.warn
|
||||
Skipping action test - no instanceId from submit
|
||||
|
||||
104 | // Skip if submit failed to get instanceId
|
||||
105 | if (!workflowInstanceId) {
|
||||
> 106 | console.warn('Skipping action test - no instanceId from submit');
|
||||
| ^
|
||||
107 | return;
|
||||
108 | }
|
||||
109 |
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:106:15)
|
||||
|
||||
● Phase 3 Workflow (E2E) › /correspondences/:id/submit (POST) - Submit to Workflow
|
||||
|
||||
expected 201 "Created", got 500 "Internal Server Error"
|
||||
|
||||
92 | note: 'Submitting for E2E test',
|
||||
93 | })
|
||||
> 94 | .expect(201);
|
||||
| ^
|
||||
95 |
|
||||
96 | expect(response.body).toHaveProperty('instanceId');
|
||||
97 | expect(response.body).toHaveProperty('currentState');
|
||||
|
||||
at Object.<anonymous> (phase3-workflow.e2e-spec.ts:94:8)
|
||||
----
|
||||
at Test._assertStatus (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:309:14)
|
||||
at ../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:365:13
|
||||
at Test._assertFunction (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:342:13)
|
||||
at Test.assert (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:195:23)
|
||||
at localAssert (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:138:14)
|
||||
at Server.<anonymous> (../../node_modules/.pnpm/supertest@7.1.4/node_modules/supertest/lib/test.js:152:11)
|
||||
|
||||
A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find leaks. Active timers can also cause this, ensure that .unref() was called on them.
|
||||
Test Suites: 1 failed, 2 passed, 3 total
|
||||
Tests: 1 failed, 4 passed, 5 total
|
||||
Snapshots: 0 total
|
||||
Time: 5.652 s
|
||||
Ran all test suites.
|
||||
ΓÇëELIFECYCLEΓÇë Command failed with exit code 1.
|
||||
@@ -1,344 +0,0 @@
|
||||
|
||||
> backend@1.8.0 lint D:\nap-dms.lcbp3\backend
|
||||
> eslint "{src,apps,libs,test}/**/*.ts" --fix
|
||||
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\common\auth\auth.controller.spec.ts
|
||||
81:13 error 'result' is assigned a value but never used @typescript-eslint/no-unused-vars
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\common\auth\auth.service.spec.ts
|
||||
21:7 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
|
||||
26:7 error 'jwtService' is assigned a value but never used @typescript-eslint/no-unused-vars
|
||||
27:7 error 'tokenRepo' is assigned a value but never used @typescript-eslint/no-unused-vars
|
||||
56:5 error Unsafe call of an `any` typed value @typescript-eslint/no-unsafe-call
|
||||
56:12 error Unsafe member access .compare on an `any` value @typescript-eslint/no-unsafe-member-access
|
||||
131:7 error Unsafe call of an `any` typed value @typescript-eslint/no-unsafe-call
|
||||
131:14 error Unsafe member access .compare on an `any` value @typescript-eslint/no-unsafe-member-access
|
||||
165:14 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\common\auth\strategies\jwt-refresh.strategy.ts
|
||||
27:3 error Async method 'validate' has no 'await' expression @typescript-eslint/require-await
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\common\file-storage\file-storage.controller.spec.ts
|
||||
51:13 error 'result' is assigned a value but never used @typescript-eslint/no-unused-vars
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\common\file-storage\file-storage.service.spec.ts
|
||||
88:14 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
89:14 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
121:14 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
139:14 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\common\interceptors\audit-log.interceptor.ts
|
||||
60:11 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\database\seeds\run-seed.ts
|
||||
7:37 error Unsafe argument of type `any` assigned to a parameter of type `DataSourceOptions` @typescript-eslint/no-unsafe-argument
|
||||
7:55 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
||||
11:5 error Unexpected console statement no-console
|
||||
16:5 error Unexpected console statement no-console
|
||||
18:5 error Unexpected console statement no-console
|
||||
24:1 error Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator @typescript-eslint/no-floating-promises
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\database\seeds\user.seed.ts
|
||||
61:7 error Use "@ts-expect-error" instead of "@ts-ignore", as "@ts-ignore" will do nothing if the following line is error-free @typescript-eslint/ban-ts-comment
|
||||
115:13 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
|
||||
119:11 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\database\seeds\workflow-definitions.seed.ts
|
||||
133:9 error Unexpected console statement no-console
|
||||
135:9 error Unexpected console statement no-console
|
||||
138:7 error Unexpected console statement no-console
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\circulation\circulation-workflow.service.ts
|
||||
89:57 error Invalid type "unknown" of template literal expression @typescript-eslint/restrict-template-expressions
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\circulation\circulation.service.ts
|
||||
8:34 error 'Not' is defined but never used @typescript-eslint/no-unused-vars
|
||||
98:13 error 'search' is assigned a value but never used @typescript-eslint/no-unused-vars
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\contract\contract.controller.ts
|
||||
16:3 error 'ApiQuery' is defined but never used @typescript-eslint/no-unused-vars
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\correspondence\correspondence-workflow.service.ts
|
||||
91:55 error Invalid type "unknown" of template literal expression @typescript-eslint/restrict-template-expressions
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\correspondence\correspondence.controller.spec.ts
|
||||
82:13 error 'result' is assigned a value but never used @typescript-eslint/no-unused-vars
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\correspondence\correspondence.service.spec.ts
|
||||
11:10 error 'CorrespondenceRecipient' is defined but never used @typescript-eslint/no-unused-vars
|
||||
22:27 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
||||
23:21 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
||||
24:7 error 'dataSource' is assigned a value but never used @typescript-eslint/no-unused-vars
|
||||
24:19 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
||||
133:5 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
|
||||
134:5 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
|
||||
135:5 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
|
||||
144:13 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
|
||||
144:69 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
||||
154:13 error 'mockStatus' is assigned a value but never used @typescript-eslint/no-unused-vars
|
||||
177:31 error Unsafe argument of type `any` assigned to a parameter of type `UpdateCorrespondenceDto` @typescript-eslint/no-unsafe-argument
|
||||
177:44 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
||||
177:49 error Unsafe argument of type `any` assigned to a parameter of type `User` @typescript-eslint/no-unsafe-argument
|
||||
180:14 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
184:13 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
|
||||
184:69 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
||||
208:31 error Unsafe argument of type `any` assigned to a parameter of type `UpdateCorrespondenceDto` @typescript-eslint/no-unsafe-argument
|
||||
208:44 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
||||
208:49 error Unsafe argument of type `any` assigned to a parameter of type `User` @typescript-eslint/no-unsafe-argument
|
||||
210:14 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
213:13 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
|
||||
213:69 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
||||
237:31 error Unsafe argument of type `any` assigned to a parameter of type `UpdateCorrespondenceDto` @typescript-eslint/no-unsafe-argument
|
||||
237:44 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
||||
237:49 error Unsafe argument of type `any` assigned to a parameter of type `User` @typescript-eslint/no-unsafe-argument
|
||||
239:14 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
243:13 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
|
||||
243:69 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
||||
262:7 error Unsafe call of a type that could not be resolved @typescript-eslint/no-unsafe-call
|
||||
264:10 error Unsafe member access .mockResolvedValue on a type that cannot be resolved @typescript-eslint/no-unsafe-member-access
|
||||
264:71 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
||||
270:31 error Unsafe argument of type `any` assigned to a parameter of type `UpdateCorrespondenceDto` @typescript-eslint/no-unsafe-argument
|
||||
270:44 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
||||
270:49 error Unsafe argument of type `any` assigned to a parameter of type `User` @typescript-eslint/no-unsafe-argument
|
||||
272:14 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\correspondence\dto\create-routing-template.dto.ts
|
||||
9:3 error 'IsEnum' is defined but never used @typescript-eslint/no-unused-vars
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\correspondence\entities\correspondence-recipient.entity.ts
|
||||
1:18 error 'Column' is defined but never used @typescript-eslint/no-unused-vars
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\document-numbering\controllers\document-numbering.controller.ts
|
||||
119:5 error Unexpected console statement no-console
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\document-numbering\controllers\numbering-metrics.controller.ts
|
||||
1:27 error 'UseGuards' is defined but never used @typescript-eslint/no-unused-vars
|
||||
13:3 error Async method 'getMetrics' has no 'await' expression @typescript-eslint/require-await
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\document-numbering\document-numbering.service.spec.ts
|
||||
127:14 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
128:14 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
145:13 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
|
||||
146:18 error Unsafe member access .findOne on an `any` value @typescript-eslint/no-unsafe-member-access
|
||||
151:18 error Unsafe member access .save on an `any` value @typescript-eslint/no-unsafe-member-access
|
||||
159:24 error Unsafe member access .save on an `any` value @typescript-eslint/no-unsafe-member-access
|
||||
163:13 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
|
||||
164:18 error Unsafe member access .findOne on an `any` value @typescript-eslint/no-unsafe-member-access
|
||||
168:18 error Unsafe member access .save on an `any` value @typescript-eslint/no-unsafe-member-access
|
||||
176:24 error Unsafe member access .save on an `any` value @typescript-eslint/no-unsafe-member-access
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\document-numbering\entities\document-number-audit.entity.ts
|
||||
28:42 error 'unknown' overrides all other types in this union type @typescript-eslint/no-redundant-type-constituents
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\document-numbering\services\format.service.ts
|
||||
54:5 error Unexpected console statement no-console
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\document-numbering\services\manual-override.service.spec.ts
|
||||
56:12 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
57:12 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\document-numbering\services\metrics.service.ts
|
||||
1:22 error 'Logger' is defined but never used @typescript-eslint/no-unused-vars
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\document-numbering\services\reservation.service.ts
|
||||
76:11 error 'reservation' is assigned a value but never used @typescript-eslint/no-unused-vars
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\document-numbering\services\template.service.ts
|
||||
1:30 error 'NotFoundException' is defined but never used @typescript-eslint/no-unused-vars
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\json-schema\dto\create-json-schema.dto.ts
|
||||
51:37 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
||||
55:29 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
||||
65:36 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\json-schema\dto\search-json-schema.dto.ts
|
||||
14:5 error Unsafe return of a value of type `any` @typescript-eslint/no-unsafe-return
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\json-schema\json-schema.service.ts
|
||||
92:18 error '_schema' is defined but never used @typescript-eslint/no-unused-vars
|
||||
92:35 error '_data' is defined but never used @typescript-eslint/no-unused-vars
|
||||
258:5 error 'options' is assigned a value but never used @typescript-eslint/no-unused-vars
|
||||
265:11 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\json-schema\services\virtual-column.service.ts
|
||||
101:11 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
|
||||
106:16 error Unsafe member access [0] on an `any` value @typescript-eslint/no-unsafe-member-access
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\master\dto\create-tag.dto.ts
|
||||
1:44 error 'IsInt' is defined but never used @typescript-eslint/no-unused-vars
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\master\dto\save-number-format.dto.ts
|
||||
1:39 error 'IsOptional' is defined but never used @typescript-eslint/no-unused-vars
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\master\master.controller.ts
|
||||
7:3 error 'Put' is defined but never used @typescript-eslint/no-unused-vars
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\migration\migration.controller.spec.ts
|
||||
53:12 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\migration\migration.controller.ts
|
||||
166:3 error Async method 'getStagingFile' has no 'await' expression @typescript-eslint/require-await
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\notification\dto\create-notification.dto.ts
|
||||
7:3 error 'IsUrl' is defined but never used @typescript-eslint/no-unused-vars
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\notification\dto\search-notification.dto.ts
|
||||
20:5 error Unsafe return of a value of type `any` @typescript-eslint/no-unsafe-return
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\notification\notification-cleanup.service.ts
|
||||
4:22 error 'LessThan' is defined but never used @typescript-eslint/no-unused-vars
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\notification\notification.service.ts
|
||||
12:10 error 'UserPreference' is defined but never used @typescript-eslint/no-unused-vars
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\organization\organization.service.ts
|
||||
76:5 error Unexpected console statement no-console
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\project\dto\search-project.dto.ts
|
||||
14:5 error Unsafe return of a value of type `any` @typescript-eslint/no-unsafe-return
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\project\project.controller.spec.ts
|
||||
49:13 error 'result' is assigned a value but never used @typescript-eslint/no-unused-vars
|
||||
62:13 error 'result' is assigned a value but never used @typescript-eslint/no-unused-vars
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\project\project.service.spec.ts
|
||||
64:7 error Unsafe call of an `any` typed value @typescript-eslint/no-unsafe-call
|
||||
66:10 error Unsafe member access .getManyAndCount on an `any` value @typescript-eslint/no-unsafe-member-access
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\project\project.service.ts
|
||||
8:22 error 'Like' is defined but never used @typescript-eslint/no-unused-vars
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\rfa\entities\rfa-workflow-template.entity.ts
|
||||
26:35 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\rfa\entities\rfa-workflow.entity.ts
|
||||
55:33 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\search\dto\search-query.dto.ts
|
||||
1:39 error 'IsNotEmpty' is defined but never used @typescript-eslint/no-unused-vars
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\transmittal\transmittal.controller.ts
|
||||
49:20 error '_user' is defined but never used @typescript-eslint/no-unused-vars
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\user\dto\assign-role.dto.ts
|
||||
1:41 error 'ValidateIf' is defined but never used @typescript-eslint/no-unused-vars
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\workflow-engine\dsl\parser.service.ts
|
||||
24:13 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
|
||||
185:13 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\workflow-engine\dto\evaluate-workflow.dto.ts
|
||||
24:28 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\workflow-engine\entities\workflow-history.entity.ts
|
||||
57:29 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\workflow-engine\entities\workflow-instance.entity.ts
|
||||
73:28 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\workflow-engine\workflow-dsl.service.ts
|
||||
258:20 error Implied eval. Do not use the Function constructor to create functions @typescript-eslint/no-implied-eval
|
||||
259:16 error Unsafe call of a `Function` typed value @typescript-eslint/no-unsafe-call
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\workflow-engine\workflow-engine.controller.ts
|
||||
118:3 error Async method 'getAvailableActions' has no 'await' expression @typescript-eslint/require-await
|
||||
118:42 error 'instanceId' is defined but never used @typescript-eslint/no-unused-vars
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\workflow-engine\workflow-engine.service.spec.ts
|
||||
121:14 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
122:14 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
145:14 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
188:14 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\workflow-engine\workflow-event.service.ts
|
||||
28:3 error Async method 'dispatchEvents' has no 'await' expression @typescript-eslint/require-await
|
||||
31:29 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
||||
40:5 error Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator @typescript-eslint/no-floating-promises
|
||||
73:66 error Invalid type "unknown" of template literal expression @typescript-eslint/restrict-template-expressions
|
||||
80:3 error Async method 'handleNotify' has no 'await' expression @typescript-eslint/require-await
|
||||
82:5 error '_context' is defined but never used @typescript-eslint/no-unused-vars
|
||||
91:3 error Async method 'handleWebhook' has no 'await' expression @typescript-eslint/require-await
|
||||
93:5 error '_context' is defined but never used @typescript-eslint/no-unused-vars
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\scripts\migrate-storage-v2.ts
|
||||
10:37 error Unsafe argument of type `any` assigned to a parameter of type `DataSourceOptions` @typescript-eslint/no-unsafe-argument
|
||||
10:47 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
||||
14:5 error Unexpected console statement no-console
|
||||
21:5 error Unexpected console statement no-console
|
||||
33:5 error Unexpected console statement no-console
|
||||
36:7 error Unexpected console statement no-console
|
||||
50:9 error Unexpected console statement no-console
|
||||
57:20 error Unnecessary escape character: \/ no-useless-escape
|
||||
57:78 error Unnecessary escape character: \/ no-useless-escape
|
||||
57:89 error Unnecessary escape character: \/ no-useless-escape
|
||||
68:9 error Unexpected console statement no-console
|
||||
98:37 error Unexpected console statement no-console
|
||||
100:9 error Unexpected console statement no-console
|
||||
108:5 error Unexpected console statement no-console
|
||||
109:5 error Unexpected console statement no-console
|
||||
110:5 error Unexpected console statement no-console
|
||||
111:5 error Unexpected console statement no-console
|
||||
113:5 error Unexpected console statement no-console
|
||||
119:1 error Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator @typescript-eslint/no-floating-promises
|
||||
|
||||
D:\nap-dms.lcbp3\backend\test\phase3-workflow.e2e-spec.ts
|
||||
27:7 error 'adminToken' is assigned a value but never used @typescript-eslint/no-unused-vars
|
||||
57:7 error Unexpected console statement no-console
|
||||
70:36 error Unsafe argument of type `any` assigned to a parameter of type `App` @typescript-eslint/no-unsafe-argument
|
||||
83:5 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
|
||||
83:38 error Unsafe member access .id on an `any` value @typescript-eslint/no-unsafe-member-access
|
||||
84:5 error Unexpected console statement no-console
|
||||
88:36 error Unsafe argument of type `any` assigned to a parameter of type `App` @typescript-eslint/no-unsafe-argument
|
||||
98:5 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
|
||||
98:40 error Unsafe member access .instanceId on an `any` value @typescript-eslint/no-unsafe-member-access
|
||||
99:5 error Unexpected console statement no-console
|
||||
100:5 error Unexpected console statement no-console
|
||||
100:49 error Unsafe member access .currentState on an `any` value @typescript-eslint/no-unsafe-member-access
|
||||
106:7 error Unexpected console statement no-console
|
||||
110:36 error Unsafe argument of type `any` assigned to a parameter of type `App` @typescript-eslint/no-unsafe-argument
|
||||
122:5 error Unexpected console statement no-console
|
||||
|
||||
D:\nap-dms.lcbp3\backend\test\simple.e2e-spec.ts
|
||||
1:8 error 'request' is defined but never used @typescript-eslint/no-unused-vars
|
||||
3:10 error 'RoutingTemplate' is defined but never used @typescript-eslint/no-unused-vars
|
||||
|
||||
✖ 180 problems (180 errors, 0 warnings)
|
||||
|
||||
ELIFECYCLE Command failed with exit code 1.
|
||||
@@ -1 +0,0 @@
|
||||
$2b$10$MpKnf1UEvlu8hZcqMkhMsuWG3gYD/priWTUr71GpF/uuroaGxtose
|
||||
@@ -1,122 +0,0 @@
|
||||
|
||||
> backend@1.8.0 lint D:\nap-dms.lcbp3\backend
|
||||
> eslint "{src,apps,libs,test}/**/*.ts" --fix
|
||||
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\common\auth\auth.service.spec.ts
|
||||
164:14 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\common\file-storage\file-storage.service.spec.ts
|
||||
88:14 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
89:14 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
121:14 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
139:14 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\database\seeds\user.seed.ts
|
||||
61:7 error Use "@ts-expect-error" instead of "@ts-ignore", as "@ts-ignore" will do nothing if the following line is error-free @typescript-eslint/ban-ts-comment
|
||||
115:13 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
|
||||
119:11 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\correspondence\correspondence.service.spec.ts
|
||||
187:9 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
223:9 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
259:9 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
304:9 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\document-numbering\document-numbering.service.spec.ts
|
||||
128:14 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
129:14 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
162:14 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
181:14 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\document-numbering\services\manual-override.service.spec.ts
|
||||
56:12 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
57:12 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\json-schema\dto\create-json-schema.dto.ts
|
||||
51:37 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
||||
55:29 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
||||
65:36 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\json-schema\dto\search-json-schema.dto.ts
|
||||
14:5 error Unsafe return of a value of type `any` @typescript-eslint/no-unsafe-return
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\json-schema\json-schema.service.ts
|
||||
265:11 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\json-schema\services\virtual-column.service.ts
|
||||
101:11 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
|
||||
106:16 error Unsafe member access [0] on an `any` value @typescript-eslint/no-unsafe-member-access
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\migration\migration.controller.spec.ts
|
||||
53:12 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\notification\dto\search-notification.dto.ts
|
||||
20:5 error Unsafe return of a value of type `any` @typescript-eslint/no-unsafe-return
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\project\dto\search-project.dto.ts
|
||||
14:5 error Unsafe return of a value of type `any` @typescript-eslint/no-unsafe-return
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\project\project.service.spec.ts
|
||||
64:7 error Unsafe call of an `any` typed value @typescript-eslint/no-unsafe-call
|
||||
66:10 error Unsafe member access .getManyAndCount on an `any` value @typescript-eslint/no-unsafe-member-access
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\workflow-engine\dsl\parser.service.ts
|
||||
24:13 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
|
||||
185:13 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\workflow-engine\entities\workflow-history.entity.ts
|
||||
57:29 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\workflow-engine\entities\workflow-instance.entity.ts
|
||||
73:28 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\workflow-engine\workflow-engine.service.spec.ts
|
||||
121:14 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
122:14 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
145:14 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
188:14 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
|
||||
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
|
||||
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
|
||||
|
||||
✖ 38 problems (38 errors, 0 warnings)
|
||||
|
||||
ELIFECYCLE Command failed with exit code 1.
|
||||
@@ -1,28 +0,0 @@
|
||||
|
||||
> backend@1.8.0 lint D:\nap-dms.lcbp3\backend
|
||||
> eslint "{src,apps,libs,test}/**/*.ts" --fix
|
||||
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\database\seeds\user.seed.ts
|
||||
61:7 error Use "@ts-expect-error" instead of "@ts-ignore", as "@ts-ignore" will do nothing if the following line is error-free @typescript-eslint/ban-ts-comment
|
||||
115:13 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
|
||||
119:11 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\json-schema\json-schema.service.ts
|
||||
265:11 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\json-schema\services\virtual-column.service.ts
|
||||
101:11 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
|
||||
106:16 error Unsafe member access [0] on an `any` value @typescript-eslint/no-unsafe-member-access
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\project\project.service.spec.ts
|
||||
64:7 error Unsafe call of an `any` typed value @typescript-eslint/no-unsafe-call
|
||||
66:10 error Unsafe member access .getManyAndCount on an `any` value @typescript-eslint/no-unsafe-member-access
|
||||
|
||||
D:\nap-dms.lcbp3\backend\src\modules\workflow-engine\dsl\parser.service.ts
|
||||
24:13 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
|
||||
185:13 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
|
||||
|
||||
✖ 10 problems (10 errors, 0 warnings)
|
||||
|
||||
ELIFECYCLE Command failed with exit code 1.
|
||||
@@ -1,4 +0,0 @@
|
||||
|
||||
> backend@1.8.0 lint D:\nap-dms.lcbp3\backend
|
||||
> eslint "{src,apps,libs,test}/**/*.ts" --fix
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
"socket.io": "^4.8.1",
|
||||
"swagger-ui-express": "^5.0.1",
|
||||
"typeorm": "^0.3.27",
|
||||
"uuid": "^13.0.0",
|
||||
"uuid": "^11.0.0",
|
||||
"winston": "^3.18.3",
|
||||
"zod": "^4.1.13"
|
||||
},
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
|
||||
> backend@1.5.1 test D:\nap-dms.lcbp3\backend
|
||||
> jest --forceExit "rfa"
|
||||
|
||||
No tests found, exiting with code 1
|
||||
Run with `--passWithNoTests` to exit with code 0
|
||||
In D:\nap-dms.lcbp3\backend\src
|
||||
273 files checked.
|
||||
testMatch: - 0 matches
|
||||
testPathIgnorePatterns: \\node_modules\\ - 273 matches
|
||||
testRegex: .*\.spec\.ts$ - 15 matches
|
||||
Pattern: rfa - 0 matches
|
||||
ΓÇëELIFECYCLEΓÇë Test failed. See above for more details.
|
||||
@@ -18,6 +18,7 @@ describe('CorrespondenceController', () => {
|
||||
getReferences: jest.fn(),
|
||||
addReference: jest.fn(),
|
||||
removeReference: jest.fn(),
|
||||
findOneByUuid: jest.fn(),
|
||||
};
|
||||
|
||||
mockWorkflowService = {
|
||||
@@ -98,7 +99,11 @@ describe('CorrespondenceController', () => {
|
||||
mockResult
|
||||
);
|
||||
|
||||
const mockReq = { user: { user_id: 1 } };
|
||||
const mockReq = { user: { user_id: 1, roles: [] } };
|
||||
(mockCorrespondenceService.findOneByUuid as jest.Mock).mockResolvedValue({
|
||||
id: 1,
|
||||
uuid: 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11',
|
||||
});
|
||||
const result = await controller.submit(
|
||||
'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11',
|
||||
{ note: 'Test note' },
|
||||
|
||||
@@ -15,6 +15,7 @@ import { WorkflowEngineService } from '../workflow-engine/workflow-engine.servic
|
||||
import { UserService } from '../user/user.service';
|
||||
import { SearchService } from '../search/search.service';
|
||||
import { FileStorageService } from '../../common/file-storage/file-storage.service';
|
||||
import { UuidResolverService } from '../../common/services/uuid-resolver.service';
|
||||
import { UpdateCorrespondenceDto } from './dto/update-correspondence.dto';
|
||||
import { User } from '../user/entities/user.entity';
|
||||
|
||||
@@ -23,6 +24,7 @@ describe('CorrespondenceService', () => {
|
||||
let numberingService: DocumentNumberingService;
|
||||
let correspondenceRepo: Repository<Correspondence>;
|
||||
let revisionRepo: Repository<CorrespondenceRevision>;
|
||||
let testingModule: TestingModule;
|
||||
let _dataSource: DataSource;
|
||||
|
||||
const createMockRepository = () => ({
|
||||
@@ -60,10 +62,13 @@ describe('CorrespondenceService', () => {
|
||||
},
|
||||
})),
|
||||
getRepository: jest.fn(() => createMockRepository()),
|
||||
manager: {
|
||||
findOne: jest.fn(),
|
||||
},
|
||||
};
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
testingModule = await Test.createTestingModule({
|
||||
providers: [
|
||||
CorrespondenceService,
|
||||
{
|
||||
@@ -129,20 +134,27 @@ describe('CorrespondenceService', () => {
|
||||
provide: FileStorageService,
|
||||
useValue: { commit: jest.fn().mockResolvedValue([]) },
|
||||
},
|
||||
{
|
||||
provide: UuidResolverService,
|
||||
useValue: {
|
||||
resolveProjectId: jest.fn().mockResolvedValue(1),
|
||||
resolveOrganizationId: jest.fn().mockResolvedValue(1),
|
||||
},
|
||||
},
|
||||
],
|
||||
}).compile();
|
||||
|
||||
service = module.get<CorrespondenceService>(CorrespondenceService);
|
||||
numberingService = module.get<DocumentNumberingService>(
|
||||
service = testingModule.get<CorrespondenceService>(CorrespondenceService);
|
||||
numberingService = testingModule.get<DocumentNumberingService>(
|
||||
DocumentNumberingService
|
||||
);
|
||||
correspondenceRepo = module.get<Repository<Correspondence>>(
|
||||
correspondenceRepo = testingModule.get<Repository<Correspondence>>(
|
||||
getRepositoryToken(Correspondence)
|
||||
);
|
||||
revisionRepo = module.get<Repository<CorrespondenceRevision>>(
|
||||
revisionRepo = testingModule.get<Repository<CorrespondenceRevision>>(
|
||||
getRepositoryToken(CorrespondenceRevision)
|
||||
);
|
||||
_dataSource = module.get<DataSource>(DataSource);
|
||||
_dataSource = testingModule.get<DataSource>(DataSource);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
@@ -217,6 +229,10 @@ describe('CorrespondenceService', () => {
|
||||
projectId: 2,
|
||||
};
|
||||
|
||||
const uuidResolver =
|
||||
testingModule.get<UuidResolverService>(UuidResolverService);
|
||||
(uuidResolver.resolveProjectId as jest.Mock).mockResolvedValue(2);
|
||||
|
||||
await service.update(1, updateDto, mockUser);
|
||||
|
||||
expect(
|
||||
@@ -253,6 +269,14 @@ describe('CorrespondenceService', () => {
|
||||
typeId: 999,
|
||||
};
|
||||
|
||||
const typeRepo = testingModule.get<Repository<CorrespondenceType>>(
|
||||
getRepositoryToken(CorrespondenceType)
|
||||
);
|
||||
(typeRepo.findOne as jest.Mock).mockResolvedValue({
|
||||
id: 999,
|
||||
typeCode: 'NEW-TYPE',
|
||||
});
|
||||
|
||||
await service.update(1, updateDto, mockUser);
|
||||
|
||||
expect(
|
||||
@@ -285,11 +309,8 @@ describe('CorrespondenceService', () => {
|
||||
.spyOn(correspondenceRepo, 'findOne')
|
||||
.mockResolvedValue(mockCorr as unknown as Correspondence);
|
||||
|
||||
// Access private property for mocking via casting
|
||||
const internalService = service as unknown as {
|
||||
orgRepo: Repository<Organization>;
|
||||
};
|
||||
jest.spyOn(internalService.orgRepo, 'findOne').mockResolvedValue({
|
||||
// Access DataSource manager for mocking
|
||||
mockDataSource.manager.findOne.mockResolvedValue({
|
||||
id: 88,
|
||||
organizationCode: 'NEW-ORG',
|
||||
} as unknown as Organization);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { Repository } from 'typeorm';
|
||||
import { Repository, EntityManager } from 'typeorm';
|
||||
import { DocumentNumberingService } from './services/document-numbering.service';
|
||||
import { CounterService } from './services/counter.service';
|
||||
import { ReservationService } from './services/reservation.service';
|
||||
@@ -13,6 +13,7 @@ import { DocumentNumberError } from './entities/document-number-error.entity';
|
||||
import { DocumentNumberingLockService } from './services/document-numbering-lock.service';
|
||||
import { ManualOverrideService } from './services/manual-override.service';
|
||||
import { MetricsService } from './services/metrics.service';
|
||||
import { UuidResolverService } from '../../common/services/uuid-resolver.service';
|
||||
|
||||
describe('DocumentNumberingService', () => {
|
||||
let service: DocumentNumberingService;
|
||||
@@ -58,7 +59,9 @@ describe('DocumentNumberingService', () => {
|
||||
{
|
||||
provide: FormatService,
|
||||
useValue: {
|
||||
format: jest.fn().mockResolvedValue('0001'),
|
||||
format: jest
|
||||
.fn()
|
||||
.mockResolvedValue({ previewNumber: '0001', isDefault: false }),
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -98,6 +101,17 @@ describe('DocumentNumberingService', () => {
|
||||
save: jest.fn().mockResolvedValue({}),
|
||||
},
|
||||
},
|
||||
{
|
||||
provide: EntityManager,
|
||||
useValue: { transaction: jest.fn() },
|
||||
},
|
||||
{
|
||||
provide: UuidResolverService,
|
||||
useValue: {
|
||||
resolveProjectId: jest.fn().mockResolvedValue(1),
|
||||
resolveOrganizationId: jest.fn().mockResolvedValue(1),
|
||||
},
|
||||
},
|
||||
],
|
||||
}).compile();
|
||||
|
||||
@@ -117,7 +131,10 @@ describe('DocumentNumberingService', () => {
|
||||
describe('generateNextNumber', () => {
|
||||
it('should generate a new number successfully', async () => {
|
||||
(counterService.incrementCounter as jest.Mock).mockResolvedValue(1);
|
||||
(formatService.format as jest.Mock).mockResolvedValue('DOC-0001');
|
||||
(formatService.format as jest.Mock).mockResolvedValue({
|
||||
previewNumber: 'DOC-0001',
|
||||
isDefault: false,
|
||||
});
|
||||
|
||||
const result = await service.generateNextNumber(mockContext);
|
||||
|
||||
|
||||
@@ -6,6 +6,9 @@ import { CorrespondenceType } from '../correspondence/entities/correspondence-ty
|
||||
import { CorrespondenceStatus } from '../correspondence/entities/correspondence-status.entity';
|
||||
import { Project } from '../project/entities/project.entity';
|
||||
import { DataSource } from 'typeorm';
|
||||
import { MigrationReviewQueue } from './entities/migration-review-queue.entity';
|
||||
import { MigrationError } from './entities/migration-error.entity';
|
||||
import { FileStorageService } from '../../common/file-storage/file-storage.service';
|
||||
|
||||
describe('MigrationService', () => {
|
||||
let service: MigrationService;
|
||||
@@ -71,6 +74,18 @@ describe('MigrationService', () => {
|
||||
provide: DataSource,
|
||||
useValue: mockDataSource,
|
||||
},
|
||||
{
|
||||
provide: getRepositoryToken(MigrationReviewQueue),
|
||||
useValue: { findOne: jest.fn(), create: jest.fn(), save: jest.fn() },
|
||||
},
|
||||
{
|
||||
provide: getRepositoryToken(MigrationError),
|
||||
useValue: { create: jest.fn(), save: jest.fn() },
|
||||
},
|
||||
{
|
||||
provide: FileStorageService,
|
||||
useValue: { importStagingFile: jest.fn() },
|
||||
},
|
||||
],
|
||||
}).compile();
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import { UserService } from './user.service';
|
||||
import { User } from './entities/user.entity';
|
||||
import { Role } from './entities/role.entity';
|
||||
import { Permission } from './entities/permission.entity';
|
||||
import { UuidResolverService } from '../../common/services/uuid-resolver.service';
|
||||
|
||||
// Mock Repository
|
||||
const mockUserRepository = {
|
||||
@@ -56,6 +57,13 @@ describe('UserService', () => {
|
||||
provide: getRepositoryToken(Permission),
|
||||
useValue: mockUserRepository, // Reuse generic mock
|
||||
},
|
||||
{
|
||||
provide: UuidResolverService,
|
||||
useValue: {
|
||||
resolveOrganizationId: jest.fn().mockResolvedValue(1),
|
||||
resolveProjectId: jest.fn().mockResolvedValue(1),
|
||||
},
|
||||
},
|
||||
],
|
||||
}).compile();
|
||||
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
|
||||
> backend@1.5.1 test D:\nap-dms.lcbp3\backend
|
||||
> jest "src/common/auth/casl/ability.factory.spec.ts"
|
||||
|
||||
FAIL src/common/auth/casl/ability.factory.spec.ts
|
||||
AbilityFactory
|
||||
√ should be defined (11 ms)
|
||||
Global Admin
|
||||
× should grant all permissions for global admin (5 ms)
|
||||
Organization Level
|
||||
√ should grant permissions for matching organization (3 ms)
|
||||
√ should deny permissions for non-matching organization (2 ms)
|
||||
Project Level
|
||||
√ should grant permissions for matching project (2 ms)
|
||||
Contract Level
|
||||
√ should grant permissions for matching contract (2 ms)
|
||||
Multiple Assignments
|
||||
√ should combine permissions from multiple assignments (2 ms)
|
||||
|
||||
● AbilityFactory › Global Admin › should grant all permissions for global admin
|
||||
|
||||
expect(received).toBe(expected) // Object.is equality
|
||||
|
||||
Expected: true
|
||||
Received: false
|
||||
|
||||
34 | const ability = factory.createForUser(user, {});
|
||||
35 |
|
||||
> 36 | expect(ability.can('manage', 'all')).toBe(true);
|
||||
| ^
|
||||
37 | });
|
||||
38 | });
|
||||
39 |
|
||||
|
||||
at Object.<anonymous> (common/auth/casl/ability.factory.spec.ts:36:44)
|
||||
|
||||
Test Suites: 1 failed, 1 total
|
||||
Tests: 1 failed, 6 passed, 7 total
|
||||
Snapshots: 0 total
|
||||
Time: 1.325 s, estimated 2 s
|
||||
Ran all test suites matching src/common/auth/casl/ability.factory.spec.ts.
|
||||
ΓÇëELIFECYCLEΓÇë Test failed. See above for more details.
|
||||
@@ -1,52 +0,0 @@
|
||||
|
||||
> backend@1.5.1 test D:\nap-dms.lcbp3\backend
|
||||
> jest "src/common/auth/casl/ability.factory.spec.ts"
|
||||
|
||||
console.log
|
||||
ABILITY RULES: [
|
||||
{
|
||||
"action": "manage_all",
|
||||
"subject": "system"
|
||||
}
|
||||
]
|
||||
|
||||
at Object.<anonymous> (common/auth/casl/ability.factory.spec.ts:35:15)
|
||||
|
||||
FAIL src/common/auth/casl/ability.factory.spec.ts
|
||||
AbilityFactory
|
||||
√ should be defined (11 ms)
|
||||
Global Admin
|
||||
× should grant all permissions for global admin (19 ms)
|
||||
Organization Level
|
||||
√ should grant permissions for matching organization (3 ms)
|
||||
√ should deny permissions for non-matching organization (2 ms)
|
||||
Project Level
|
||||
√ should grant permissions for matching project (3 ms)
|
||||
Contract Level
|
||||
√ should grant permissions for matching contract (1 ms)
|
||||
Multiple Assignments
|
||||
√ should combine permissions from multiple assignments (1 ms)
|
||||
|
||||
● AbilityFactory › Global Admin › should grant all permissions for global admin
|
||||
|
||||
expect(received).toBe(expected) // Object.is equality
|
||||
|
||||
Expected: true
|
||||
Received: false
|
||||
|
||||
35 | console.log('ABILITY RULES:', JSON.stringify(ability.rules, null, 2));
|
||||
36 |
|
||||
> 37 | expect(ability.can('manage', 'all')).toBe(true);
|
||||
| ^
|
||||
38 | });
|
||||
39 | });
|
||||
40 |
|
||||
|
||||
at Object.<anonymous> (common/auth/casl/ability.factory.spec.ts:37:44)
|
||||
|
||||
Test Suites: 1 failed, 1 total
|
||||
Tests: 1 failed, 6 passed, 7 total
|
||||
Snapshots: 0 total
|
||||
Time: 1.298 s, estimated 2 s
|
||||
Ran all test suites matching src/common/auth/casl/ability.factory.spec.ts.
|
||||
ΓÇëELIFECYCLEΓÇë Test failed. See above for more details.
|
||||
@@ -1,32 +0,0 @@
|
||||
|
||||
> backend@1.5.1 test D:\nap-dms.lcbp3\backend
|
||||
> jest "src/common/auth/casl/ability.factory.spec.ts"
|
||||
|
||||
FAIL src/common/auth/casl/ability.factory.spec.ts
|
||||
ΓùÅ Test suite failed to run
|
||||
|
||||
Cannot find module '../../../common/entities/base.entity.js' from 'modules/project/entities/organization.entity.ts'
|
||||
|
||||
Require stack:
|
||||
modules/project/entities/organization.entity.ts
|
||||
modules/user/entities/user.entity.ts
|
||||
common/auth/casl/ability.factory.spec.ts
|
||||
|
||||
1 | import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';
|
||||
> 2 | import { BaseEntity } from '../../../common/entities/base.entity.js';
|
||||
| ^
|
||||
3 |
|
||||
4 | @Entity('organizations')
|
||||
5 | export class Organization extends BaseEntity {
|
||||
|
||||
at Resolver._throwModNotFoundError (../node_modules/jest-resolve/build/index.js:863:11)
|
||||
at Object.<anonymous> (modules/project/entities/organization.entity.ts:2:1)
|
||||
at Object.<anonymous> (modules/user/entities/user.entity.ts:16:1)
|
||||
at Object.<anonymous> (common/auth/casl/ability.factory.spec.ts:3:1)
|
||||
|
||||
Test Suites: 1 failed, 1 total
|
||||
Tests: 0 total
|
||||
Snapshots: 0 total
|
||||
Time: 1.11 s
|
||||
Ran all test suites matching src/common/auth/casl/ability.factory.spec.ts.
|
||||
ΓÇëELIFECYCLEΓÇë Test failed. See above for more details.
|
||||
@@ -1,34 +0,0 @@
|
||||
|
||||
> backend@1.5.1 test D:\nap-dms.lcbp3\backend
|
||||
> jest "src/common/auth/casl/ability.factory.spec.ts"
|
||||
|
||||
FAIL src/common/auth/casl/ability.factory.spec.ts
|
||||
ΓùÅ Test suite failed to run
|
||||
|
||||
Cannot find module '../../../common/entities/base.entity.js' from 'modules/project/entities/project.entity.ts'
|
||||
|
||||
Require stack:
|
||||
modules/project/entities/project.entity.ts
|
||||
modules/user/entities/user-assignment.entity.ts
|
||||
modules/user/entities/user.entity.ts
|
||||
common/auth/casl/ability.factory.spec.ts
|
||||
|
||||
1 | import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';
|
||||
> 2 | import { BaseEntity } from '../../../common/entities/base.entity.js';
|
||||
| ^
|
||||
3 |
|
||||
4 | @Entity('projects')
|
||||
5 | export class Project extends BaseEntity {
|
||||
|
||||
at Resolver._throwModNotFoundError (../node_modules/jest-resolve/build/index.js:863:11)
|
||||
at Object.<anonymous> (modules/project/entities/project.entity.ts:2:1)
|
||||
at Object.<anonymous> (modules/user/entities/user-assignment.entity.ts:15:1)
|
||||
at Object.<anonymous> (modules/user/entities/user.entity.ts:17:1)
|
||||
at Object.<anonymous> (common/auth/casl/ability.factory.spec.ts:3:1)
|
||||
|
||||
Test Suites: 1 failed, 1 total
|
||||
Tests: 0 total
|
||||
Snapshots: 0 total
|
||||
Time: 1.3 s
|
||||
Ran all test suites matching src/common/auth/casl/ability.factory.spec.ts.
|
||||
ΓÇëELIFECYCLEΓÇë Test failed. See above for more details.
|
||||
@@ -1,42 +0,0 @@
|
||||
|
||||
> backend@1.5.1 test D:\nap-dms.lcbp3\backend
|
||||
> jest "src/common/auth/casl/ability.factory.spec.ts"
|
||||
|
||||
FAIL src/common/auth/casl/ability.factory.spec.ts
|
||||
AbilityFactory
|
||||
√ should be defined (12 ms)
|
||||
Global Admin
|
||||
× should grant all permissions for global admin (4 ms)
|
||||
Organization Level
|
||||
√ should grant permissions for matching organization (3 ms)
|
||||
√ should deny permissions for non-matching organization (2 ms)
|
||||
Project Level
|
||||
√ should grant permissions for matching project (3 ms)
|
||||
Contract Level
|
||||
√ should grant permissions for matching contract (2 ms)
|
||||
Multiple Assignments
|
||||
√ should combine permissions from multiple assignments (2 ms)
|
||||
|
||||
● AbilityFactory › Global Admin › should grant all permissions for global admin
|
||||
|
||||
expect(received).toBe(expected) // Object.is equality
|
||||
|
||||
Expected: true
|
||||
Received: false
|
||||
|
||||
34 | const ability = factory.createForUser(user, {});
|
||||
35 |
|
||||
> 36 | expect(ability.can('manage', 'all')).toBe(true);
|
||||
| ^
|
||||
37 | });
|
||||
38 | });
|
||||
39 |
|
||||
|
||||
at Object.<anonymous> (common/auth/casl/ability.factory.spec.ts:36:44)
|
||||
|
||||
Test Suites: 1 failed, 1 total
|
||||
Tests: 1 failed, 6 passed, 7 total
|
||||
Snapshots: 0 total
|
||||
Time: 1.168 s, estimated 2 s
|
||||
Ran all test suites matching src/common/auth/casl/ability.factory.spec.ts.
|
||||
ΓÇëELIFECYCLEΓÇë Test failed. See above for more details.
|
||||
@@ -1,43 +0,0 @@
|
||||
FAIL src/modules/document-numbering/document-numbering.service.spec.ts
|
||||
DocumentNumberingService
|
||||
√ should be defined (15 ms)
|
||||
generateNextNumber
|
||||
√ should generate a new number successfully (4 ms)
|
||||
√ should throw error when increment fails (9 ms)
|
||||
Admin Operations
|
||||
× voidAndReplace should verify audit log exists (2 ms)
|
||||
× cancelNumber should log cancellation (3 ms)
|
||||
|
||||
● DocumentNumberingService › Admin Operations › voidAndReplace should verify audit log exists
|
||||
|
||||
TypeError: Cannot read properties of undefined (reading 'mockResolvedValue')
|
||||
|
||||
143 | it('voidAndReplace should verify audit log exists', async () => {
|
||||
144 | const auditRepo = module.get(getRepositoryToken(DocumentNumberAudit));
|
||||
> 145 | (auditRepo.findOne as jest.Mock).mockResolvedValue({
|
||||
| ^
|
||||
146 | generatedNumber: 'DOC-001',
|
||||
147 | counterKey: JSON.stringify({ projectId: 1, correspondenceTypeId: 1 }),
|
||||
148 | templateUsed: 'test',
|
||||
|
||||
at Object.<anonymous> (modules/document-numbering/document-numbering.service.spec.ts:145:40)
|
||||
|
||||
● DocumentNumberingService › Admin Operations › cancelNumber should log cancellation
|
||||
|
||||
TypeError: Cannot read properties of undefined (reading 'mockResolvedValue')
|
||||
|
||||
161 | it('cancelNumber should log cancellation', async () => {
|
||||
162 | const auditRepo = module.get(getRepositoryToken(DocumentNumberAudit));
|
||||
> 163 | (auditRepo.findOne as jest.Mock).mockResolvedValue({
|
||||
| ^
|
||||
164 | generatedNumber: 'DOC-002',
|
||||
165 | counterKey: {},
|
||||
166 | });
|
||||
|
||||
at Object.<anonymous> (modules/document-numbering/document-numbering.service.spec.ts:163:40)
|
||||
|
||||
Test Suites: 1 failed, 1 total
|
||||
Tests: 2 failed, 3 passed, 5 total
|
||||
Snapshots: 0 total
|
||||
Time: 1.381 s, estimated 2 s
|
||||
Ran all test suites matching src/modules/document-numbering/document-numbering.service.spec.ts.
|
||||
@@ -1,17 +0,0 @@
|
||||
|
||||
> backend@1.5.1 test
|
||||
> jest --forceExit modules/document-numbering/document-numbering.service.spec.ts
|
||||
|
||||
PASS src/modules/document-numbering/document-numbering.service.spec.ts
|
||||
DocumentNumberingService
|
||||
√ should be defined (13 ms)
|
||||
generateNextNumber
|
||||
√ should generate a new number successfully (6 ms)
|
||||
√ should throw error when increment fails (12 ms)
|
||||
|
||||
Test Suites: 1 passed, 1 total
|
||||
Tests: 3 passed, 3 total
|
||||
Snapshots: 0 total
|
||||
Time: 1.449 s, estimated 2 s
|
||||
Ran all test suites matching modules/document-numbering/document-numbering.service.spec.ts.
|
||||
Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished?
|
||||
Reference in New Issue
Block a user