Example
Example copied to clipboard
`npm t` omit execution of some test cases
Describe the bug
Example project has tests for API in the application/domain/tests
folder. Specifically two tests http.test.js
and ws.test.js
running the same test cases from api.js
, e.g.
https://github.com/metarhia/Example/blob/2435b8e643af3fc4a62fea1f3f20bdedc1e1d9c1/application/domain/tests/api.js#L11-L14
It seems that Call example.add({ a, b })
don't execute during test run.
To Reproduce
- Open Example project in the terminal
- Run
npm t
- There is no
Call example.add({ a, b })
test mentioning in the console logs despite thatMetacom over HTTP
andMetacom over Websocket
marked as passed.
11:52:24 W1 debug ✅ Passed: Get room with domain.chat.getRoom (0.251542ms)
11:52:24 W1 debug ✅ Passed: Send message with domain.chat.send (0.097667ms)
11:52:24 W1 debug ✅ Passed: Chat test (1.12525ms)
11:52:24 W2 debug 127.0.0.1 POST /api 200
11:52:24 W2 log 127.0.0.1 system/introspect
11:52:24 W1 debug ✅ Passed: Metacom over HTTP (17.8425ms)
11:52:24 W1 debug 127.0.0.1 GET /demo.txt 200
11:52:24 W1 debug ✅ Passed: Test to serve without cache (7.318167ms)
11:52:24 W3 debug 127.0.0.1 GET / 200
11:52:24 W1 debug ✅ Passed: Get static resource: http://127.0.0.1:8000/ (7.025792ms)
11:52:24 W1 debug 127.0.0.1 GET /console.js 200
11:52:24 W1 debug ✅ Passed: Get static resource: http://127.0.0.1:8000/console.js (2.40575ms)
11:52:24 W1 error 127.0.0.1 GET /unknown 404
11:52:24 W1 debug ✅ Passed: Get static resource: http://127.0.0.1:8000/unknown (2.39425ms)
11:52:24 W1 error 127.0.0.1 GET /unknown.png 404
11:52:24 W1 debug ✅ Passed: Get static resource: http://127.0.0.1:8000/unknown.png (2.170125ms)
11:52:24 W1 error 127.0.0.1 GET /unknown/unknown 404
11:52:24 W1 debug ✅ Passed: Get static resource: http://127.0.0.1:8000/unknown/unknown (1.154375ms)
11:52:24 W1 error 127.0.0.1 GET /unknown/unknown.png 404
11:52:24 W1 debug ✅ Passed: Get static resource: http://127.0.0.1:8000/unknown/unknown.png (1.115292ms)
11:52:24 W1 debug 127.0.0.1 GET /article 200
11:52:24 W1 debug ✅ Passed: Get static resource: http://127.0.0.1:8000/article (1.617167ms)
11:52:24 W1 debug 127.0.0.1 GET /article/file.txt 200
11:52:24 W1 debug ✅ Passed: Get static resource: http://127.0.0.1:8000/article/file.txt (2.123542ms)
11:52:24 W1 debug 127.0.0.1 GET /article/name 200
11:52:24 W1 debug ✅ Passed: Get static resource: http://127.0.0.1:8000/article/name (1.464959ms)
11:52:24 W1 debug ✅ Passed: Static server test (30.391125ms)
11:52:24 W2 log 127.0.0.1 system/introspect
11:52:24 W1 debug ✅ Passed: Metacom over Websocket (5.606583ms)
11:52:24 W1 debug 🟢 Passed 16, Failed: 0
Additional context
OS: macOS 14.1.2 Node: 20.9.0