Skip to content

Commit 510b93e

Browse files
authored
Fix test compilation for token-balance (#3798)
1 parent 1041617 commit 510b93e

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

.github/workflows/checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
- name: Compile tests
7474
env:
7575
CHANGED_PACKAGES: ${{ needs.install-packages.outputs.changed-packages }}
76-
FAILING_TESTS_PATTERN: '/composites/dydx-rewards/|/composites/glv-token/|/composites/gm-token/|/core/bootstrap/|/sources/bitgo-reserves-test/|/sources/bitgo-reserves/|/sources/coinpaprika/|/sources/cryptocompare/|/sources/icap/|/sources/ipfs/|/sources/layer2-sequencer-health/|/sources/por-address-list/|/sources/s3-csv-reader/|/sources/token-balance/|/sources/view-function-multi-chain/|sources/view-function/'
76+
FAILING_TESTS_PATTERN: '/composites/dydx-rewards/|/composites/glv-token/|/composites/gm-token/|/core/bootstrap/|/sources/bitgo-reserves-test/|/sources/bitgo-reserves/|/sources/coinpaprika/|/sources/cryptocompare/|/sources/icap/|/sources/ipfs/|/sources/layer2-sequencer-health/|/sources/por-address-list/|/sources/s3-csv-reader/|/sources/view-function-multi-chain/|sources/view-function/'
7777
run: |
7878
# Tests that should compile:
7979
yarn tsc -b --noEmit $(echo $CHANGED_PACKAGES | jq '.[].location + "/tsconfig.test.json"' -r | grep -v -E "$FAILING_TESTS_PATTERN")

packages/sources/token-balance/test/integration/fixtures.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ import nock from 'nock'
33
type JsonRpcPayload = {
44
id: number
55
method: string
6-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
7-
params: Array<any> | Record<string, any>
6+
params: Array<{ to: string; data: string }>
87
jsonrpc: '2.0'
98
}
109

@@ -13,7 +12,7 @@ export const mockETHMainnetContractCallResponseSuccess = (): nock.Scope =>
1312
.post('/', (body: any) => Array.isArray(body))
1413
.reply(
1514
200,
16-
(uri, requestBody: any[]) => {
15+
(_uri, requestBody: any[]) => {
1716
return requestBody.map((request: JsonRpcPayload) => {
1817
if (request.method === 'eth_chainId') {
1918
return {
@@ -83,7 +82,7 @@ export const mockBASEMainnetContractCallResponseSuccess = (): nock.Scope =>
8382
.post('/', (body: any) => Array.isArray(body))
8483
.reply(
8584
200,
86-
(uri, requestBody: any[]) => {
85+
(_uri, requestBody: any[]) => {
8786
return requestBody.map((request: JsonRpcPayload) => {
8887
if (request.method === 'eth_chainId') {
8988
return {
@@ -141,7 +140,7 @@ export const mockETHContractCallResponseSuccess = (): nock.Scope =>
141140
.post('/', (body: any) => Array.isArray(body))
142141
.reply(
143142
200,
144-
(uri, requestBody: any[]) => {
143+
(_uri, requestBody: any[]) => {
145144
return requestBody.map((request: JsonRpcPayload) => {
146145
if (request.method === 'eth_chainId') {
147146
return {

0 commit comments

Comments
 (0)