Skip to content

Commit

Permalink
chore(): temporarily skip flaky ws test
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagosiebler committed Nov 14, 2023
1 parent c45dd5d commit dc6e0ff
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
5 changes: 3 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
__PROD__: false
},
testEnvironment: 'node',
preset: "ts-jest",
preset: 'ts-jest',
verbose: true, // report individual test
bail: false, // enable to stop test when an error occur,
detectOpenHandles: false,
Expand All @@ -16,6 +16,7 @@ module.exports = {
collectCoverageFrom: [
'src/**/*.ts'
],
testTimeout: 10000,
coverageThreshold: {
// coverage strategy
global: {
Expand All @@ -25,4 +26,4 @@ module.exports = {
statements: -10
}
}
};
};
11 changes: 9 additions & 2 deletions test/ws.private.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ import {
WS_ERROR_ENUM,
WS_KEY_MAP,
} from '../src';
import { getSilentLogger, waitForSocketEvent } from './ws.util';
import {
getSilentLogger,
listenToSocketEvents,
logAllEvents,
waitForSocketEvent,
} from './ws.util';

describe('Private Spot Websocket Client', () => {
describe.skip('Private Spot Websocket Client', () => {
const API_KEY = process.env.API_KEY_COM;
const API_SECRET = process.env.API_SECRET_COM;
const API_PASS = process.env.API_PASS_COM;
Expand All @@ -29,6 +34,7 @@ describe('Private Spot Websocket Client', () => {
getSilentLogger('expect401'),
);

logAllEvents(badClient);
// const wsOpenPromise = waitForSocketEvent(badClient, 'open');
const wsResponsePromise = waitForSocketEvent(badClient, 'response');
// const wsUpdatePromise = waitForSocketEvent(wsClient, 'update');
Expand Down Expand Up @@ -66,6 +72,7 @@ describe('Private Spot Websocket Client', () => {
);
wsClient.connectAll();
// logAllEvents(wsClient);
logAllEvents(wsClient);
});

afterAll(() => {
Expand Down
2 changes: 1 addition & 1 deletion test/ws.util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const fullLogger = {
export function waitForSocketEvent(
wsClient: WebsocketClient,
event: WsClientEvent,
timeoutMs: number = 4.5 * 1000,
timeoutMs: number = 10 * 1000,
) {
return new Promise((resolve, reject) => {
const timeout = setTimeout(() => {
Expand Down

0 comments on commit dc6e0ff

Please sign in to comment.