Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
piyalbasu committed Oct 11, 2024
1 parent 5eaed96 commit 2d87f59
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/helper/test-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function backendClientMaker(network: NetworkNames) {
}
case query.getTokenBalanceSub(
"CBGTG7XFRY3L6OKAUTR6KGDKUXUQBX3YDJ3QFDYTGVMOM7VV4O7NCODG",
tokenBalanceLedgerKey
tokenBalanceLedgerKey,
): {
return Promise.resolve({
data: {
Expand All @@ -123,7 +123,7 @@ function backendClientMaker(network: NetworkNames) {
}
case query.getTokenBalanceSub(
"CCWAMYJME4H5CKG7OLXGC2T4M6FL52XCZ3OQOAV6LL3GLA4RO4WH3ASP",
tokenBalanceLedgerKey
tokenBalanceLedgerKey,
): {
return Promise.resolve({
data: {
Expand All @@ -141,7 +141,7 @@ function backendClientMaker(network: NetworkNames) {
}
case query.getTokenBalanceSub(
"CDP3XWJ4ZN222LKYBMWIY3GYXZYX3KA6WVNDS6V7WKXSYWLAEMYW7DTZ",
tokenBalanceLedgerKey
tokenBalanceLedgerKey,
): {
return Promise.resolve({
data: {
Expand All @@ -160,7 +160,7 @@ function backendClientMaker(network: NetworkNames) {
case query.getCurrentDataAccountBalances(
pubKey,
tokenBalanceLedgerKey,
[]
[],
): {
return Promise.resolve({
data: queryMockResponse["query.getAccountBalancesCurrentData"],
Expand Down Expand Up @@ -592,7 +592,7 @@ const mockMercuryClient = new MercuryClient(
mercuryErrorCounter,
rpcErrorCounter,
criticalError,
}
},
);
jest.mock("@blockaid/client", () => {
return class Blockaid {};
Expand All @@ -601,7 +601,7 @@ const blockAidClient = new Blockaid();
const blockAidService = new BlockAidService(
blockAidClient,
testLogger,
register
register,
);

jest
Expand All @@ -613,7 +613,7 @@ jest
decimals: 7,
symbol: "TST",
};
}
},
);
async function getDevServer() {
const server = await initApiServer(
Expand All @@ -623,7 +623,12 @@ async function getDevServer() {
true,
true,
register,
"development"
"development",
{
useBlockaidAssetScanning: true,
useBlockaidDappScanning: true,
useBlockaidTxScanning: true,
},
);

await server.listen();
Expand Down

0 comments on commit 2d87f59

Please sign in to comment.