Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm t omit execution of some test cases #263

Open
KLarpen opened this issue Dec 18, 2023 · 0 comments · May be fixed by #264
Open

npm t omit execution of some test cases #263

KLarpen opened this issue Dec 18, 2023 · 0 comments · May be fixed by #264

Comments

@KLarpen
Copy link
Contributor

KLarpen commented Dec 18, 2023

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.

await t.test(`Call example.add({ a, b })`, async () => {
const res = await metacom.api.example.add({ a: 10, b: 20 });
node.assert.strictEqual(res, 30);
});

It seems that Call example.add({ a, b }) don't execute during test run.

To Reproduce

  1. Open Example project in the terminal
  2. Run npm t
  3. There is no Call example.add({ a, b }) test mentioning in the console logs despite that Metacom over HTTP and Metacom 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

KLarpen added a commit to KLarpen/Metarhia-Example that referenced this issue Dec 18, 2023
@KLarpen KLarpen linked a pull request Dec 18, 2023 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant