Skip to content

Commit

Permalink
fix(internal-plugin-device): add-done-for-async-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ShreyasSharma28 committed Dec 22, 2023
1 parent 2c69062 commit e566cf4
Showing 1 changed file with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,13 @@ describe('plugin-device', () => {
})
);

afterEach('unregister the device and remove test users', () =>
device.unregister().then(() => testUsers.remove([user]))
);
afterEach('unregister the device and remove test users', (done) => {
device
.unregister()
.then(() => testUsers.remove([user]))
.then(() => done())
.catch(done);
});

describe('events', () => {
describe('when a meeting is started', () => {
Expand Down Expand Up @@ -574,8 +578,9 @@ describe('plugin-device', () => {
);
});

afterEach('reset the device request', () => {
afterEach('reset the device request', (done) => {
device.request = request;
done();
});

it('should clear the current device', () =>
Expand Down Expand Up @@ -604,8 +609,9 @@ describe('plugin-device', () => {
);
});

afterEach('resest the request method', () => {
afterEach('resest the request method', (done) => {
device.request = request;
done();
});

it('should return a rejected promise', () => assert.isRejected(device.refresh()));
Expand Down Expand Up @@ -865,8 +871,9 @@ describe('plugin-device', () => {
);
});

afterEach('reset the request method', () => {
afterEach('reset the request method', (done) => {
device.request = request;
done(0);
});

it('returns a rejected promise', () => assert.isRejected(device.unregister()));
Expand Down

0 comments on commit e566cf4

Please sign in to comment.