For reasons I don't understand, attempts to use waitForExpect() are returning a Jest error instead of waiting (and possibly timing out).
expected [] to be an array containing exactly 1 items
429 |
430 | await waitForExpect(() => {
> 431 | expect(receivedMessages).toBeArrayOfSize(1)
| ^
432 | })
433 |
at src/__tests__/amqp-service.test.js:431:38
at Timeout.runExpectation [as _onTimeout] (node_modules/wait-for-expect/lib/index.js:46:25)