Skip to content

Commit

Permalink
Undo beforeAll/afterAll changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mstyura committed Jun 15, 2021
1 parent 4c4f3e9 commit 389ab89
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions test/test-Consumer.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,8 @@ const consumerDeviceCapabilities =
]
};

const initializeWorker = async () =>
beforeAll(async () =>
{
if (worker)
{
await worker.close();
}
worker = await createWorker();
router = await worker.createRouter({ mediaCodecs });
transport1 = await router.createWebRtcTransport(
Expand All @@ -261,22 +257,9 @@ const initializeWorker = async () =>

// Pause the videoProducer.
await videoProducer.pause();
};

const shutdownWorker = async () =>
{
await worker.close();
};

beforeAll(async () =>
{
await initializeWorker();
});

afterAll(async () =>
{
await shutdownWorker();
});
afterAll(() => worker.close());

test('transport.consume() succeeds', async () =>
{
Expand Down

0 comments on commit 389ab89

Please sign in to comment.