Closed fwextensions closed 2 years ago
Hmm, it looks like we may have a non-deterministic error failure... on the main sfbrigade repo we run the test suite with Github checks so everything should be passing...
I often find that these issues are related to the prior test API returning responses within a transaction. The test runner gets the response, and then goes to the next test before the transaction commits, and we get some weird out-of-order serialization of the prior test transaction and the setup for the next test.
Will need to investigate further to see if I can reproduce...
Running just the ringdown tests with mocha --recursive --grep "/api/ringdowns POST"
seems to work.
/api/ringdowns
POST /
✓ creates a ringdown (104ms)
✓ creates a new ambulance record as needed (72ms)
2 passing (666ms)
I'm not sure why the test stops when it hits that one failing test. If just those are skipped with mocha --recursive --grep "/api/ringdowns POST" --invert
, more tests run, but it still stops with a failure:
36 passing (5s)
1 failing
1) /api/ringdowns
PATCH /:id
updates an existing ringdown:
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
null !== 99
at Context.<anonymous> (test/integration/api/ringdowns.js:369:14)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
When executing
npm run test:server
, the test ends with this output:The test stops after that, so it's possible there are other failing tests. I'm not familiar enough with Mocha to know how to force it to keep going. (From the docs, it seems like it should by default.)