Skip to content

Commit

Permalink
test files remove error catch cast
Browse files Browse the repository at this point in the history
  • Loading branch information
samgermain committed Apr 27, 2024
1 parent f849d2f commit a933f8c
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion ts/src/pro/test/Exchange/test.watchBalance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ async function testWatchBalance (exchange, skippedProperties, code) {
let response = undefined;
try {
response = await exchange.watchBalance ();
} catch (e: any) {
} catch (e) {
if (!testSharedMethods.isTemporaryFailure (e)) {
throw e;
}
Expand Down
2 changes: 1 addition & 1 deletion ts/src/pro/test/Exchange/test.watchBidsAsks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function testWatchBidsAsksHelper (exchange, skippedProperties, argSymbols,
let response = undefined;
try {
response = await exchange.watchBidsAsks (argSymbols, argParams);
} catch (e: any) {
} catch (e) {
// for some exchanges, multi symbol methods might require symbols array to be present, so
// so, if method throws "arguments-required" exception, we don't fail test, but just skip silently,
// because tests will make a second call of this method with symbols array
Expand Down
2 changes: 1 addition & 1 deletion ts/src/pro/test/Exchange/test.watchMyTrades.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ async function testWatchMyTrades (exchange, skippedProperties, symbol) {
let response = undefined;
try {
response = await exchange.watchMyTrades (symbol);
} catch (e: any) {
} catch (e) {
if (!testSharedMethods.isTemporaryFailure (e)) {
throw e;
}
Expand Down
2 changes: 1 addition & 1 deletion ts/src/pro/test/Exchange/test.watchOHLCV.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ async function testWatchOHLCV (exchange, skippedProperties, symbol) {
let response = undefined;
try {
response = await exchange.watchOHLCV (symbol, chosenTimeframeKey, since, limit);
} catch (e: any) {
} catch (e) {
if (!testSharedMethods.isTemporaryFailure (e)) {
throw e;
}
Expand Down
2 changes: 1 addition & 1 deletion ts/src/pro/test/Exchange/test.watchOrderBook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ async function testWatchOrderBook (exchange, skippedProperties, symbol) {
let response = undefined;
try {
response = await exchange.watchOrderBook (symbol);
} catch (e: any) {
} catch (e) {
if (!testSharedMethods.isTemporaryFailure (e)) {
throw e;
}
Expand Down
2 changes: 1 addition & 1 deletion ts/src/pro/test/Exchange/test.watchOrders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ async function testWatchOrders (exchange, skippedProperties, symbol) {
let response = undefined;
try {
response = await exchange.watchOrders (symbol);
} catch (e: any) {
} catch (e) {
if (!testSharedMethods.isTemporaryFailure (e)) {
throw e;
}
Expand Down
2 changes: 1 addition & 1 deletion ts/src/pro/test/Exchange/test.watchPosition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ async function testWatchPosition (exchange, skippedProperties, symbol) {
let response = undefined;
try {
response = await exchange.watchPosition (symbol);
} catch (e: any) {
} catch (e) {
if (!testSharedMethods.isTemporaryFailure (e)) {
throw e;
}
Expand Down
4 changes: 2 additions & 2 deletions ts/src/pro/test/Exchange/test.watchPositions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ async function testWatchPositions (exchange, skippedProperties, symbol) {
let response = undefined;
try {
response = await exchange.watchPositions (symbol);
} catch (e: any) {
} catch (e) {
if (!testSharedMethods.isTemporaryFailure (e)) {
throw e;
}
Expand All @@ -30,7 +30,7 @@ async function testWatchPositions (exchange, skippedProperties, symbol) {
let positionsForSymbols = undefined;
try {
positionsForSymbols = await exchange.watchPositions ([ symbol ]);
} catch (e: any) {
} catch (e) {
if (!testSharedMethods.isTemporaryFailure (e)) {
throw e;
}
Expand Down
2 changes: 1 addition & 1 deletion ts/src/pro/test/Exchange/test.watchTicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ async function testWatchTicker (exchange, skippedProperties, symbol) {
let response = undefined;
try {
response = await exchange.watchTicker (symbol);
} catch (e: any) {
} catch (e) {
if (!testSharedMethods.isTemporaryFailure (e)) {
throw e;
}
Expand Down
2 changes: 1 addition & 1 deletion ts/src/pro/test/Exchange/test.watchTickers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function testWatchTickersHelper (exchange: Exchange, skippedProperties: ob
let response: Tickers = undefined;
try {
response = await exchange.watchTickers (argSymbols, argParams);
} catch (e: any) {
} catch (e) {
// for some exchanges, specifically watchTickers method not subscribe
// to "all tickers" itself, and it requires symbols to be set
// so, in such case, if it's arguments-required exception, we don't
Expand Down
2 changes: 1 addition & 1 deletion ts/src/pro/test/Exchange/test.watchTrades.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ async function testWatchTrades (exchange, skippedProperties, symbol) {
let response = undefined;
try {
response = await exchange.watchTrades (symbol);
} catch (e: any) {
} catch (e) {
if (!testSharedMethods.isTemporaryFailure (e)) {
throw e;
}
Expand Down

0 comments on commit a933f8c

Please sign in to comment.