-
-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Description
I was able to reproduce this issue by running the test few times (seems like race condition) on Windows with Node.js v22.18.0.
"test": "set NODE_OPTIONS=--experimental-vm-modules && jest --runInBand --detectOpenHandles --forceExit"Jest reports 4 open ThreadSafeCallback handles and warns that they may be keeping Jest from exiting (p2p.test.ts):
● ThreadSafeCallback callback
66 | });
67 |
> 68 | dc1 = peer1.createDataChannel('test-p2p');
| ^
69 | dc1.onOpen(() => {
70 | p1DCMock();
71 | dc1.sendMessage('Hello From Peer1');
at test/jest-tests/p2p.test.ts:68:19
at Object.<anonymous> (test/jest-tests/p2p.test.ts:11:12)
● ThreadSafeCallback callback
67 |
68 | dc1 = peer1.createDataChannel('test-p2p');
> 69 | dc1.onOpen(() => {
| ^
70 | p1DCMock();
71 | dc1.sendMessage('Hello From Peer1');
72 | });
at test/jest-tests/p2p.test.ts:69:11
at Object.<anonymous> (test/jest-tests/p2p.test.ts:11:12)
● ThreadSafeCallback callback
71 | dc1.sendMessage('Hello From Peer1');
72 | });
> 73 | dc1.onMessage((msg) => {
| ^
74 | p1DCMessageMock(msg);
75 | peer1.close();
76 | peer2.close();
at test/jest-tests/p2p.test.ts:73:11
at Object.<anonymous> (test/jest-tests/p2p.test.ts:11:12)
● ThreadSafeCallback callback
57 | peer1.addRemoteCandidate(candidate, mid);
58 | });
> 59 | peer2.onDataChannel((dc) => {
| ^
60 | p2DCMock();
61 | dc2 = dc;
62 | dc2.onMessage((msg) => {
at test/jest-tests/p2p.test.ts:59:13
at Object.<anonymous> (test/jest-tests/p2p.test.ts:11:12)
Metadata
Metadata
Assignees
Labels
No labels