Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zodern committed Dec 23, 2024
1 parent 9955b02 commit 5643654
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/await-detector.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import { SupportsAsyncLocalStorage } from './utils/platform';
(SupportsAsyncLocalStorage ? describe : describe.skip)(
'AwaitDetector',
async () => {
const { AwaitDetector } = SupportsAsyncLocalStorage
? await import('./await-detector')
: {};
let AwaitDetector;
if (SupportsAsyncLocalStorage) {
AwaitDetector = require('./await-detector').AwaitDetector;
}

let detector;

Expand Down
6 changes: 3 additions & 3 deletions src/websocket.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('WebSockets', function () {
},
});

const [job] = await monti.waitFor(CoreEvent.JOB_ADDED);
const [job] = await monti.waitFor(CoreEvent.JOB_CREATED);

expect(job).to.be.deep.equal({
_id: 'id1',
Expand All @@ -79,7 +79,7 @@ describe('WebSockets', function () {
},
});

const [event] = await monti.waitFor(CoreEvent.JOB_ADDED);
const [event] = await monti.waitFor(CoreEvent.JOB_CREATED);

expect(event).to.be.deep.equal({ _id: 'id1', foo: 'bar' });

Expand All @@ -91,7 +91,7 @@ describe('WebSockets', function () {
},
});

const [job] = await monti.waitFor(CoreEvent.JOB_ADDED);
const [job] = await monti.waitFor(CoreEvent.JOB_CREATED);

expect(job).to.be.deep.equal({ _id: 'id1', foo: 'bar' });

Expand Down

0 comments on commit 5643654

Please sign in to comment.