Skip to content

Resolve test suite configuration failure #1487

@trillium

Description

@trillium

Overview

While working on an unrelated PR one of the tests failed. Pushing back up again 15m later resolved the issue, but tests shouldn't sometimes fail.

Action Items

Take a look at the error blob below and figure out why this test might sometimes fail.

FAIL routers/events.router.test.js
  ● READ › GET Event by ID

    expect(received).toBe(expected) // Object.is equality

    Expected: "64ec225b[41](https://github.com/hackforla/VRMS/actions/runs/5995586790/job/16258833574#step:6:42)eeef001d27d73a"
    Received: undefined

       96 |     expect(response.statusCode).toBe(200);
       97 |     const apiRetrievedEvent = await response.body;
    >  98 |     expect(apiRetrievedEvent._id).toBe(dbCreatedeventId);
          |                                   ^
       99 | 
      100 |     done();
      101 |   });

      at Object.<anonymous> (routers/events.router.test.js:98:35)
          at runMicrotasks (<anonymous>)

POST /api/events/ 201 11.914 ms - 164
  • Investigate updating dependency of MongoDB in memory database.
  • Add findings to this issue in a comment.
  • Create a test that confirms the backend test environment has initialized properly.

Resources

@plang-psm says

When we did an audit on the cron job for the events, we realized it causes a lot of random issue every time it fetches for events

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Final QA (product)

Relationships

None yet

Development

No branches or pull requests

Issue actions