Skip to content

Commit

Permalink
Try adding timeout to Jest beforeEach and afterEach hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
ibc committed Jan 11, 2024
1 parent 9427ce1 commit 3d7e87c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ const TEST_TIMEOUT = 20000;
const ctx: TestContext = {};

beforeEach(async () => {
jest.setTimeout(TEST_TIMEOUT);

ctx.worker = await createWorker({ logLevel: 'debug' });

ctx.device = new Device({
Expand Down Expand Up @@ -116,7 +114,7 @@ beforeEach(async () => {
kind: audioConsumerRemoteParameters.kind,
rtpParameters: audioConsumerRemoteParameters.rtpParameters,
});
});
}, TEST_TIMEOUT);

afterEach(async () => {
ctx.worker?.close();
Expand All @@ -126,7 +124,7 @@ afterEach(async () => {
resolve => ctx.worker?.on('subprocessclose', resolve),
);
}
});
}, TEST_TIMEOUT);

test(
'create a Worker succeeds',
Expand Down

0 comments on commit 3d7e87c

Please sign in to comment.