Skip to content

Commit

Permalink
fix(internal-plugin-mercury): use-mocha-for-uts (#3535)
Browse files Browse the repository at this point in the history
Co-authored-by: Shreyas Sharma <[email protected]>
  • Loading branch information
Shreyas281299 and ShreyasSharma28 authored Apr 15, 2024
1 parent 46a2433 commit cbbc6f1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/@webex/internal-plugin-mercury/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@
"test": "yarn test:style && yarn test:unit && yarn test:integration && yarn test:browser",
"test:browser": "webex-legacy-tools test --integration --unit --runner karma",
"test:style": "eslint ./src/**/*.*",
"test:unit": "webex-legacy-tools test --unit --runner jest"
"test:unit": "webex-legacy-tools test --unit --runner mocha"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ describe('plugin-mercury', () => {
});
});

describe.skip('when `mercury.buffer_state` is received', () => {
describe('when `mercury.buffer_state` is received', () => {
// This test is here because the buffer states message may arrive before
// the mercury Promise resolves.
it('gets emitted', (done) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ describe('plugin-mercury', () => {
});
});

describe.skip('when webSocketUrl is provided', () => {
describe('when webSocketUrl is provided', () => {
it('connects to Mercury with provided url', () => {
const webSocketUrl = 'ws://providedurl.com';
const promise = mercury.connect(webSocketUrl);
Expand All @@ -403,7 +403,7 @@ describe('plugin-mercury', () => {
});
});

describe.skip('Websocket proxy agent', () => {
describe('Websocket proxy agent', () => {
afterEach(() => {
delete webex.config.defaultMercuryOptions;
});
Expand Down Expand Up @@ -451,7 +451,7 @@ describe('plugin-mercury', () => {
});
});

describe.skip('#disconnect()', () => {
describe('#disconnect()', () => {
it('disconnects the WebSocket', () =>
mercury
.connect()
Expand Down
14 changes: 8 additions & 6 deletions packages/@webex/internal-plugin-mercury/test/unit/spec/socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ describe('plugin-mercury', () => {
});

beforeEach(() => {
sinon.stub(Socket, 'getWebSocketConstructor').callsFake(() => function (...args) {
mockWebSocket = new MockWebSocket(...args);
sinon.stub(Socket, 'getWebSocketConstructor').callsFake(
() =>
function (...args) {
mockWebSocket = new MockWebSocket(...args);

return mockWebSocket;
}
Expand Down Expand Up @@ -69,7 +71,7 @@ describe('plugin-mercury', () => {
});
});

describe.skip('#open()', () => {
describe('#open()', () => {
let socket;

beforeEach(() => {
Expand Down Expand Up @@ -213,7 +215,7 @@ describe('plugin-mercury', () => {
});
});

describe.skip('#open()', () => {
describe('#open()', () => {
it('requires a url parameter', () => {
const s = new Socket();

Expand Down Expand Up @@ -566,7 +568,7 @@ describe('plugin-mercury', () => {
});
});

describe.skip('#onclose()', () => {
describe('#onclose()', () => {
it('stops further ping checks', () => {
socket._ping.resetHistory();
assert.notCalled(socket._ping);
Expand Down Expand Up @@ -750,7 +752,7 @@ describe('plugin-mercury', () => {
});
});

describe.skip('#_ping()', () => {
describe('#_ping()', () => {
let id;

beforeEach(() => {
Expand Down

0 comments on commit cbbc6f1

Please sign in to comment.