Skip to content

npm t omit execution of some test cases #263

Description

@KLarpen

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions