UNPKG

@practica/create-node-app

Version:

Create Node.js app that is packed with best practices AND strive for simplicity

368 lines (275 loc) 33.5 kB
> order-service@0.0.8 test > PRETTY_PRINT=true jest --forceExit --verbose=true --runInBand Determining test suites to run...global-setup: 36.672ms         RUNS  test/add-order.test.ts    {"level":30,"time":1712468039550,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","msg":"Starting the web server now"}  RUNS  test/add-order.test.ts      RUNS  test/add-order.test.ts    {"level":30,"time":1712468039820,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","msg":"Server listening at http://0.0.0.0:3000"}  RUNS  test/add-order.test.ts      RUNS  test/add-order.test.ts    {"level":30,"time":1712468039880,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","reqId":"req-1","req":{"method":"POST","url":"/order","hostname":"127.0.0.1:3000","remoteAddress":"127.0.0.1","remotePort":58551},"msg":"incoming request"}  RUNS  test/add-order.test.ts    {"level":30,"time":1712468039901,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","requestId":"90583e5a-1d7d-45fc-a4e9-03a55f09e546","msg":"Order API was called to add new Order {\n userId: 1,\n productId: 2,\n countryId: 1,\n deliveryAddress: '123 Main St, New York, NY 10001',\n paymentTermsInDays: 30\n}"}  RUNS  test/add-order.test.ts    {"level":30,"time":1712468040523,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","requestId":"90583e5a-1d7d-45fc-a4e9-03a55f09e546","msg":"Sequelize operation was just executed in 25 ms with sql: Executed (default): INSERT INTO \"Order\" (\"id\",\"deliveryAddress\",\"userId\",\"countryId\",\"paymentTermsInDays\",\"productId\",\"createdAt\",\"updatedAt\") VALUES (DEFAULT,$1,$2,$3,$4,$5,$6,$7) RETURNING \"id\",\"deliveryAddress\",\"userId\",\"countryId\",\"paymentTermsInDays\",\"productId\",\"createdAt\",\"updatedAt\"; \"123 Main St, New York, NY 10001\", 1, 1, 30, 2, \"2024-04-07 05:34:00.174 +00:00\", \"2024-04-07 05:34:00.174 +00:00\""}  RUNS  test/add-order.test.ts    {"level":30,"time":1712468040525,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","reqId":"req-1","res":{"statusCode":200},"responseTime":644.6599170044065,"msg":"request completed"}  RUNS  test/add-order.test.ts      RUNS  test/add-order.test.ts    {"level":30,"time":1712468040529,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","reqId":"req-2","req":{"method":"POST","url":"/order","hostname":"127.0.0.1:3000","remoteAddress":"127.0.0.1","remotePort":58551},"msg":"incoming request"}  RUNS  test/add-order.test.ts    {"level":30,"time":1712468040531,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","requestId":"1123b058-7923-4177-8d08-275d467c6b2b","msg":"Order API was called to add new Order {\n userId: 1,\n productId: 2,\n countryId: 1,\n deliveryAddress: '123 Main St, New York, NY 10001',\n paymentTermsInDays: 30\n}"}  RUNS  test/add-order.test.ts    {"level":30,"time":1712468040554,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","requestId":"1123b058-7923-4177-8d08-275d467c6b2b","msg":"Sequelize operation was just executed in 17 ms with sql: Executed (default): INSERT INTO \"Order\" (\"id\",\"deliveryAddress\",\"userId\",\"countryId\",\"paymentTermsInDays\",\"productId\",\"createdAt\",\"updatedAt\") VALUES (DEFAULT,$1,$2,$3,$4,$5,$6,$7) RETURNING \"id\",\"deliveryAddress\",\"userId\",\"countryId\",\"paymentTermsInDays\",\"productId\",\"createdAt\",\"updatedAt\"; \"123 Main St, New York, NY 10001\", 1, 1, 30, 2, \"2024-04-07 05:34:00.537 +00:00\", \"2024-04-07 05:34:00.537 +00:00\""}  RUNS  test/add-order.test.ts    {"level":30,"time":1712468040555,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","reqId":"req-2","res":{"statusCode":200},"responseTime":25.24024999886751,"msg":"request completed"}  RUNS  test/add-order.test.ts    {"level":30,"time":1712468040556,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","reqId":"req-3","req":{"method":"GET","url":"/order/6","hostname":"127.0.0.1:3000","remoteAddress":"127.0.0.1","remotePort":58551},"msg":"incoming request"}  RUNS  test/add-order.test.ts    {"level":30,"time":1712468040556,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","requestId":"b7a9d524-e375-4599-a0a7-dbf27141d6ed","orderId":6,"msg":"Order API was called to get order by id"}  RUNS  test/add-order.test.ts    {"level":30,"time":1712468040556,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","requestId":"b7a9d524-e375-4599-a0a7-dbf27141d6ed","msg":"Getting order by id 6"}  RUNS  test/add-order.test.ts    {"level":30,"time":1712468040564,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","requestId":"b7a9d524-e375-4599-a0a7-dbf27141d6ed","msg":"Sequelize operation was just executed in 3 ms with sql: Executed (default): SELECT \"Order\".\"id\", \"Order\".\"deliveryAddress\", \"Order\".\"userId\", \"Order\".\"countryId\", \"Order\".\"paymentTermsInDays\", \"Order\".\"productId\", \"Order\".\"createdAt\", \"Order\".\"updatedAt\", \"Country\".\"id\" AS \"Country.id\", \"Country\".\"name\" AS \"Country.name\" FROM \"Order\" AS \"Order\" LEFT OUTER JOIN \"Country\" AS \"Country\" ON \"Order\".\"countryId\" = \"Country\".\"id\" WHERE \"Order\".\"id\" = 6;"}  RUNS  test/add-order.test.ts    {"level":30,"time":1712468040565,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","reqId":"req-3","res":{"statusCode":200},"responseTime":8.992334000766277,"msg":"request completed"}  RUNS  test/add-order.test.ts      RUNS  test/add-order.test.ts    {"level":30,"time":1712468040566,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","reqId":"req-4","req":{"method":"POST","url":"/order","hostname":"127.0.0.1:3000","remoteAddress":"127.0.0.1","remotePort":58551},"msg":"incoming request"}  RUNS  test/add-order.test.ts      RUNS  test/add-order.test.ts     console.log middleware 1   at Object.fastifyErrorMiddleware (../../libraries/error-handling/.dist/fastify-error-middleware.js:6:13)  RUNS  test/add-order.test.ts    {"level":30,"time":1712468040579,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","requestId":"e613725f-e5df-4265-bbdb-961ebb19246d","msg":"Handling error1"}  RUNS  test/add-order.test.ts      RUNS  test/add-order.test.ts     console.log Handling error1   at Object.handleError (../../libraries/error-handling/.dist/error-handler.js:28:21)  RUNS  test/add-order.test.ts    {"level":50,"time":1712468040582,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","requestId":"e613725f-e5df-4265-bbdb-961ebb19246d","name":"Error","HTTPStatus":400,"isCatastrophic":false,"statusCode":400,"code":"FST_ERR_VALIDATION","validation":[{"instancePath":"","schemaPath":"#/required","keyword":"required","params":{"missingProperty":"productId"},"message":"must have required property 'productId'"}],"validationContext":"body","msg":"body must have required property 'productId'"}  RUNS  test/add-order.test.ts      RUNS  test/add-order.test.ts     console.log Handling error2   at Object.handleError (../../libraries/error-handling/.dist/error-handler.js:31:21)  RUNS  test/add-order.test.ts    {"level":30,"time":1712468040583,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","requestId":"e613725f-e5df-4265-bbdb-961ebb19246d","msg":"Firing metric error with labels {\"errorName\":\"Error\"}"}  RUNS  test/add-order.test.ts      RUNS  test/add-order.test.ts     console.log middleware 2   at Object.fastifyErrorMiddleware (../../libraries/error-handling/.dist/fastify-error-middleware.js:10:13)  RUNS  test/add-order.test.ts    {"level":30,"time":1712468040583,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","reqId":"req-4","res":{"statusCode":400},"responseTime":17.238624997437,"msg":"request completed"}  RUNS  test/add-order.test.ts      RUNS  test/add-order.test.ts      RUNS  test/add-order.test.ts      RUNS  test/add-order.test.ts      RUNS  test/add-order.test.ts    {"level":30,"time":1712468040585,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","reqId":"req-5","req":{"method":"POST","url":"/order","hostname":"127.0.0.1:3000","remoteAddress":"127.0.0.1","remotePort":58551},"msg":"incoming request"}  RUNS  test/add-order.test.ts    {"level":30,"time":1712468040586,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","requestId":"6510e57e-61e4-4464-84dc-a5e7a3bf6a88","msg":"Order API was called to add new Order {\n userId: 7,\n productId: 1,\n countryId: 1,\n deliveryAddress: '123 Main St, New York, NY 10001',\n paymentTermsInDays: 30\n}"}  RUNS  test/add-order.test.ts      RUNS  test/add-order.test.ts     console.log middleware 1   at Object.fastifyErrorMiddleware (../../libraries/error-handling/.dist/fastify-error-middleware.js:6:13)  RUNS  test/add-order.test.ts    {"level":30,"time":1712468040589,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","requestId":"6510e57e-61e4-4464-84dc-a5e7a3bf6a88","msg":"Handling error1"}  RUNS  test/add-order.test.ts      RUNS  test/add-order.test.ts     console.log Handling error1   at Object.handleError (../../libraries/error-handling/.dist/error-handler.js:28:21)  RUNS  test/add-order.test.ts    {"level":50,"time":1712468040590,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","requestId":"6510e57e-61e4-4464-84dc-a5e7a3bf6a88","name":"user-doesnt-exist","HTTPStatus":404,"isCatastrophic":false,"msg":"The user 7 doesnt exist"}  RUNS  test/add-order.test.ts      RUNS  test/add-order.test.ts     console.log Handling error2   at Object.handleError (../../libraries/error-handling/.dist/error-handler.js:31:21)  RUNS  test/add-order.test.ts    {"level":30,"time":1712468040591,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","requestId":"6510e57e-61e4-4464-84dc-a5e7a3bf6a88","msg":"Firing metric error with labels {\"errorName\":\"user-doesnt-exist\"}"}  RUNS  test/add-order.test.ts      RUNS  test/add-order.test.ts     console.log middleware 2   at Object.fastifyErrorMiddleware (../../libraries/error-handling/.dist/fastify-error-middleware.js:10:13)  RUNS  test/add-order.test.ts    {"level":30,"time":1712468040592,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","reqId":"req-5","res":{"statusCode":404},"responseTime":6.927874997258186,"msg":"request completed"}  RUNS  test/add-order.test.ts      RUNS  test/add-order.test.ts     PASS  test/add-order.test.ts (2.803 s)  RUNS  test/add-order.test.ts     /api  RUNS  test/add-order.test.ts     POST /orders  RUNS  test/add-order.test.ts      When adding a new valid order, Then should get back approval with 200 response (706 ms)  RUNS  test/add-order.test.ts      When adding a new valid order, Then should be able to retrieve it (37 ms)  RUNS  test/add-order.test.ts      When adding an order without specifying product, stop and return 400 (19 ms)  RUNS  test/add-order.test.ts      When the user does not exist, return 404 response (9 ms)  RUNS  test/add-order.test.ts      todo When a new order failed, an invalid-order error was handled  RUNS  test/add-order.test.ts      todo When a new valid order was added, then order-added metric was fired  RUNS  test/add-order.test.ts      todo When the user service is down, then order is still added successfully  RUNS  test/add-order.test.ts      RUNS  test/add-order.test.ts      RUNS  test/get-order.test.ts    {"level":30,"time":1712468040922,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","msg":"Starting the web server now"}  RUNS  test/get-order.test.ts      RUNS  test/get-order.test.ts    {"level":30,"time":1712468040990,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","msg":"Server listening at http://0.0.0.0:3000"}  RUNS  test/get-order.test.ts    {"level":30,"time":1712468040999,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","reqId":"req-1","req":{"method":"POST","url":"/order","hostname":"127.0.0.1:3000","remoteAddress":"127.0.0.1","remotePort":58556},"msg":"incoming request"}  RUNS  test/get-order.test.ts    {"level":30,"time":1712468041000,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","requestId":"f7f75bb8-c405-4695-af8f-a1ad8ef2eff6","msg":"Order API was called to add new Order {\n userId: 1,\n productId: 2,\n countryId: 1,\n deliveryAddress: '123 Main St, New York, NY 10001',\n paymentTermsInDays: 30\n}"}  RUNS  test/get-order.test.ts    {"level":30,"time":1712468041080,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","requestId":"f7f75bb8-c405-4695-af8f-a1ad8ef2eff6","msg":"Sequelize operation was just executed in 2 ms with sql: Executed (default): INSERT INTO \"Order\" (\"id\",\"deliveryAddress\",\"userId\",\"countryId\",\"paymentTermsInDays\",\"productId\",\"createdAt\",\"updatedAt\") VALUES (DEFAULT,$1,$2,$3,$4,$5,$6,$7) RETURNING \"id\",\"deliveryAddress\",\"userId\",\"countryId\",\"paymentTermsInDays\",\"productId\",\"createdAt\",\"updatedAt\"; \"123 Main St, New York, NY 10001\", 1, 1, 30, 2, \"2024-04-07 05:34:01.038 +00:00\", \"2024-04-07 05:34:01.038 +00:00\""}  RUNS  test/get-order.test.ts    {"level":30,"time":1712468041080,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","reqId":"req-1","res":{"statusCode":200},"responseTime":80.72741699963808,"msg":"request completed"}  RUNS  test/get-order.test.ts    {"level":30,"time":1712468041081,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","reqId":"req-2","req":{"method":"GET","url":"/order/7","hostname":"127.0.0.1:3000","remoteAddress":"127.0.0.1","remotePort":58556},"msg":"incoming request"}  RUNS  test/get-order.test.ts    {"level":30,"time":1712468041082,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","requestId":"b439430c-a96c-4200-8409-fd6c1e7a0fb6","orderId":7,"msg":"Order API was called to get order by id"}  RUNS  test/get-order.test.ts    {"level":30,"time":1712468041082,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","requestId":"b439430c-a96c-4200-8409-fd6c1e7a0fb6","msg":"Getting order by id 7"}  RUNS  test/get-order.test.ts    {"level":30,"time":1712468041085,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","requestId":"b439430c-a96c-4200-8409-fd6c1e7a0fb6","msg":"Sequelize operation was just executed in 1 ms with sql: Executed (default): SELECT \"Order\".\"id\", \"Order\".\"deliveryAddress\", \"Order\".\"userId\", \"Order\".\"countryId\", \"Order\".\"paymentTermsInDays\", \"Order\".\"productId\", \"Order\".\"createdAt\", \"Order\".\"updatedAt\", \"Country\".\"id\" AS \"Country.id\", \"Country\".\"name\" AS \"Country.name\" FROM \"Order\" AS \"Order\" LEFT OUTER JOIN \"Country\" AS \"Country\" ON \"Order\".\"countryId\" = \"Country\".\"id\" WHERE \"Order\".\"id\" = 7;"}  RUNS  test/get-order.test.ts    {"level":30,"time":1712468041086,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","reqId":"req-2","res":{"statusCode":200},"responseTime":4.339958004653454,"msg":"request completed"}  RUNS  test/get-order.test.ts      RUNS  test/get-order.test.ts     PASS  test/get-order.test.ts (0.441 s)  RUNS  test/get-order.test.ts     /api  RUNS  test/get-order.test.ts     GET /order  RUNS  test/get-order.test.ts      When asked for an existing order, Then should retrieve it and receive 200 response (95 ms)  RUNS  test/get-order.test.ts      skipped When asked for an non-existing order, Then should receive 404 response  RUNS  test/get-order.test.ts      RUNS  test/get-order.test.ts      RUNS  test/delete-order.test.ts    {"level":30,"time":1712468041391,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","msg":"Starting the web server now"}  RUNS  test/delete-order.test.ts      RUNS  test/delete-order.test.ts    {"level":30,"time":1712468041444,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","msg":"Server listening at http://0.0.0.0:3000"}  RUNS  test/delete-order.test.ts    {"level":30,"time":1712468041447,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","reqId":"req-1","req":{"method":"POST","url":"/order","hostname":"127.0.0.1:3000","remoteAddress":"127.0.0.1","remotePort":58559},"msg":"incoming request"}  RUNS  test/delete-order.test.ts    {"level":30,"time":1712468041447,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","requestId":"1973470f-e8af-49a5-9b96-5f04bcc426d3","msg":"Order API was called to add new Order {\n userId: 1,\n productId: 2,\n countryId: 1,\n deliveryAddress: '123 Main St, New York, NY 10001',\n paymentTermsInDays: 30\n}"}  RUNS  test/delete-order.test.ts    {"level":30,"time":1712468041502,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","requestId":"1973470f-e8af-49a5-9b96-5f04bcc426d3","msg":"Sequelize operation was just executed in 2 ms with sql: Executed (default): INSERT INTO \"Order\" (\"id\",\"deliveryAddress\",\"userId\",\"countryId\",\"paymentTermsInDays\",\"productId\",\"createdAt\",\"updatedAt\") VALUES (DEFAULT,$1,$2,$3,$4,$5,$6,$7) RETURNING \"id\",\"deliveryAddress\",\"userId\",\"countryId\",\"paymentTermsInDays\",\"productId\",\"createdAt\",\"updatedAt\"; \"123 Main St, New York, NY 10001\", 1, 1, 30, 2, \"2024-04-07 05:34:01.475 +00:00\", \"2024-04-07 05:34:01.475 +00:00\""}  RUNS  test/delete-order.test.ts    {"level":30,"time":1712468041502,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","reqId":"req-1","res":{"statusCode":200},"responseTime":55.62508299946785,"msg":"request completed"}  RUNS  test/delete-order.test.ts    {"level":30,"time":1712468041503,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","reqId":"req-2","req":{"method":"DELETE","url":"/order/8","hostname":"127.0.0.1:3000","remoteAddress":"127.0.0.1","remotePort":58559},"msg":"incoming request"}  RUNS  test/delete-order.test.ts    {"level":30,"time":1712468041504,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","requestId":"f53912f7-be1a-48fd-a736-a712ff8ae031","orderId":8,"msg":"Order API was called to delete order"}  RUNS  test/delete-order.test.ts    {"level":30,"time":1712468041506,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","requestId":"f53912f7-be1a-48fd-a736-a712ff8ae031","msg":"Sequelize operation was just executed in 1 ms with sql: Executed (default): DELETE FROM \"Order\" WHERE \"id\" = 8"}  RUNS  test/delete-order.test.ts    {"level":30,"time":1712468041506,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","reqId":"req-2","res":{"statusCode":204},"responseTime":2.9922920018434525,"msg":"request completed"}  RUNS  test/delete-order.test.ts    {"level":30,"time":1712468041507,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","reqId":"req-3","req":{"method":"GET","url":"/order/8","hostname":"127.0.0.1:3000","remoteAddress":"127.0.0.1","remotePort":58559},"msg":"incoming request"}  RUNS  test/delete-order.test.ts    {"level":30,"time":1712468041507,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","requestId":"f6537c5d-e940-43fc-b24d-a24ae2a71e19","orderId":8,"msg":"Order API was called to get order by id"}  RUNS  test/delete-order.test.ts    {"level":30,"time":1712468041507,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","requestId":"f6537c5d-e940-43fc-b24d-a24ae2a71e19","msg":"Getting order by id 8"}  RUNS  test/delete-order.test.ts    {"level":30,"time":1712468041511,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","requestId":"f6537c5d-e940-43fc-b24d-a24ae2a71e19","msg":"Sequelize operation was just executed in 2 ms with sql: Executed (default): SELECT \"Order\".\"id\", \"Order\".\"deliveryAddress\", \"Order\".\"userId\", \"Order\".\"countryId\", \"Order\".\"paymentTermsInDays\", \"Order\".\"productId\", \"Order\".\"createdAt\", \"Order\".\"updatedAt\", \"Country\".\"id\" AS \"Country.id\", \"Country\".\"name\" AS \"Country.name\" FROM \"Order\" AS \"Order\" LEFT OUTER JOIN \"Country\" AS \"Country\" ON \"Order\".\"countryId\" = \"Country\".\"id\" WHERE \"Order\".\"id\" = 8;"}  RUNS  test/delete-order.test.ts    {"level":30,"time":1712468041511,"pid":20686,"hostname":"Yonis-MacBook-Pro-2.local","reqId":"req-3","res":{"statusCode":404},"responseTime":4.219749994575977,"msg":"request completed"}  RUNS  test/delete-order.test.ts      RUNS  test/delete-order.test.ts     PASS  test/delete-order.test.ts (0.427 s)  RUNS  test/delete-order.test.ts     /api  RUNS  test/delete-order.test.ts     DELETE /order  RUNS  test/delete-order.test.ts      When deleting an existing order, Then it should NOT be retrievable (68 ms)  RUNS  test/delete-order.test.ts      RUNS  test/delete-order.test.ts     0.7 s  /api POST /orders When adding a new valid order, Then should get back approval with 200 response ----------------------------------------|---------|----------|---------|---------|------------------- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ----------------------------------------|---------|----------|---------|---------|------------------- All files  |  94.21 |  85.36 |  87.09 |  94.21 |    order-service  |  100 |  100 |  100 |  100 |    config.ts  |  100 |  100 |  100 |  100 |    order-service/data-access  |  95.34 |  100 |  75 |  95.34 |    order-repository.ts  |  95.34 |  100 |  75 |  95.34 | 42-43   order-service/data-access/models  |  100 |  100 |  100 |  100 |    country-model.ts  |  100 |  100 |  100 |  100 |    db-connection.ts  |  100 |  100 |  100 |  100 |    order-model.ts  |  100 |  100 |  100 |  100 |    order-service/domain  |  90.62 |  78.57 |  100 |  90.62 |    new-order-use-case.ts  |  100 |  100 |  100 |  100 |    order-schema.ts  |  100 |  100 |  100 |  100 |    order-validators.ts  |  66.66 |  50 |  100 |  66.66 | 16-22,25-26   payment-terms-service.ts  |  100 |  50 |  100 |  100 | 4   user-service-client.ts  |  100 |  100 |  100 |  100 |    order-service/entry-points-fastify/api |  96.17 |  82.35 |  100 |  96.17 |    open-api-options.ts  |  100 |  100 |  100 |  100 |    request-context.ts  |  94.44 |  100 |  100 |  94.44 | 10   routes.ts  |  96.96 |  83.33 |  100 |  96.96 | 50-52   server.ts  |  94.8 |  80 |  100 |  94.8 | 58-61   order-service/test  |  65.95 |  100 |  40 |  65.95 |    test-helpers.ts  |  65.95 |  100 |  40 |  65.95 | 5-14,24-26,28-30  ----------------------------------------|---------|----------|---------|---------|------------------- Test Suites: 3 passed, 3 total Tests: 1 skipped, 3 todo, 6 passed, 10 total Snapshots: 0 total Time: 3.796 s, estimated 5 s Ran all test suites. Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished?