Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maxima-net committed Aug 19, 2022
1 parent 0dedbf1 commit 5701cbf
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/atomexBuilder/atomexBuilder.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ import type { FetchMock } from 'jest-fetch-mock';
import WS from 'jest-websocket-mock';

import { AtomexBuilder } from '../../src/atomexBuilder/atomexBuilder';
import { config } from '../../src/atomexBuilder/atomexConfig';
import type { ExchangeSymbol } from '../../src/exchange/index';
import { createDefaultMainnetAtomex, createDefaultTestnetAtomex } from '../../src/index';

describe('Atomex Builder', () => {
const fetchMock = fetch as FetchMock;
const mainnetApiUrl = 'wss://ws.api.atomex.me';
const testnetApiUrl = 'wss://ws.api.test.atomex.me';
const exchangeSymbols: readonly ExchangeSymbol[] = [];

let mainnetMarketDataWebServer: WS;
Expand All @@ -24,8 +23,8 @@ describe('Atomex Builder', () => {
beforeEach(() => {
fetchMock.mockOnce(JSON.stringify(exchangeSymbols));

mainnetMarketDataWebServer = createMarketDataWebServer(mainnetApiUrl);
testnetMarketDataWebServer = createMarketDataWebServer(testnetApiUrl);
mainnetMarketDataWebServer = createMarketDataWebServer(config.mainnet.exchange.webSocketApiBaseUrl);
testnetMarketDataWebServer = createMarketDataWebServer(config.testnet.exchange.webSocketApiBaseUrl);
});

afterEach(() => {
Expand Down

0 comments on commit 5701cbf

Please sign in to comment.