Skip to content

Commit 7a6560a

Browse files
refactor(tests): update waitUntil assertions to use CalledExactlyOnceWith
1 parent 277b042 commit 7a6560a

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

packages/infra/src/logger/axiom-transport.test.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,7 @@ describe('axiomTransport', () => {
102102

103103
await transport.flush();
104104

105-
expect(mocks.waitUntil).toHaveBeenCalledWith(mocks.flush());
106-
expect(mocks.waitUntil).toHaveBeenCalledOnce();
105+
expect(mocks.waitUntil).toHaveBeenCalledExactlyOnceWith(mocks.flush());
107106
});
108107

109108
it('should flush with logs', async () => {
@@ -121,8 +120,7 @@ describe('axiomTransport', () => {
121120
expect.objectContaining({ level: 'error', msg: 'test log 2' }),
122121
);
123122

124-
expect(mocks.waitUntil).toHaveBeenCalledWith(mocks.flush());
125-
expect(mocks.waitUntil).toHaveBeenCalledOnce();
123+
expect(mocks.waitUntil).toHaveBeenCalledExactlyOnceWith(mocks.flush());
126124
});
127125

128126
it('should not ingest invalid logs', async () => {

0 commit comments

Comments
 (0)