yarn run v1.22.19
$ jest --testPathPattern src/tests/integration
console.log
setupEnv with: /tap-cap-table/.env.test.local
at setupEnv (src/utils/env.js:44:13)
console.log
✅ | Mongo connected succesfully jest-integration
at connectDB (src/db/config/mongoose.ts:13:17)
console.log
Deseeding from database: jest-integration
at deseedDatabase (src/tests/integration/utils.ts:54:13)
console.log
✅ Database deseeded successfully
at deseedDatabase (src/tests/integration/utils.ts:56:13)
console.log
starting server
at runLocalServer (src/tests/integration/utils.ts:21:13)
console.log
✅ | Mongo connected succesfully jest-integration
at connectDB (src/db/config/mongoose.ts:13:17)
console.log
shutting down server
at Object.shutdownLocalServer (src/tests/integration/utils.ts:27:13)
console.log
Shutting down app server...
at shutdownServer (src/app.js:87:17)
console.log
Waiting for event processing to stop...
at shutdownServer (src/app.js:91:13)
FAIL src/tests/integration/transactionPoller.test.ts (15.276 s)
● end to end with event processing
listen EADDRINUSE: address already in use :::8081
74 | const dbConn = await connectDB();
75 |
> 76 | const server = app.listen(PORT, async () => {
| ^
77 | console.log(`🚀 Server successfully launched at ${PORT}`);
78 | // Asynchronous job to track web3 events in web2
79 | startEventProcessing(finalizedOnly, dbConn);
at Function.listen (node_modules/express/lib/application.js:635:24)
at startServer (src/app.js:76:24)
at runLocalServer (src/tests/integration/utils.ts:22:15)
at Object.<anonymous> (src/tests/integration/transactionPoller.test.ts:14:5)
● end to end with event processing
AxiosError: Request failed with status code 404
at settle (node_modules/axios/lib/core/settle.js:19:12)
at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:589:11)
● Test suite failed to run
thrown: "Exceeded timeout of 10000 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."
15 | }, 10000);
16 |
> 17 | afterAll(shutdownLocalServer, 10000);
| ^
18 |
19 | const WAIT_TIME = 1000;
20 |
at Object.<anonymous> (src/tests/integration/transactionPoller.test.ts:17:1)
Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 total
Snapshots: 0 total
Time: 15.325 s
Ran all test suites matching /src\/tests\/integration/i.
Jest did not exit one second after the test run has completed.
'This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with `--detectOpenHandles` to troubleshoot this issue.
yarn test-js
- this completesyarn test-js-integration
-> this always fails