
> backend@1.5.1 test
> jest --forceExit modules/document-numbering/document-numbering.service.spec.ts

FAIL src/modules/document-numbering/document-numbering.service.spec.ts
  DocumentNumberingService
    ΓêÜ should be defined (19 ms)
    generateNextNumber
      ΓêÜ should generate a new number successfully (17 ms)
      ├ù should throw error when transaction fails (7 ms)

  ΓùÅ DocumentNumberingService ΓÇ║ generateNextNumber ΓÇ║ should throw error when transaction fails

    expect(received).rejects.toThrow()

    Received promise resolved instead of rejected
    Resolved to value: {"auditId": 1, "number": "0001"}

      201 |       );
      202 |
    > 203 |       await expect(service.generateNextNumber(mockContext)).rejects.toThrow(
          |             ^
      204 |         Error
      205 |       );
      206 |     });

      at expect (../node_modules/expect/build/index.js:2116:15)
      at Object.<anonymous> (modules/document-numbering/document-numbering.service.spec.ts:203:13)

Test Suites: 1 failed, 1 total
Tests:       1 failed, 2 passed, 3 total
Snapshots:   0 total
Time:        1.506 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?
