Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
serg-plusplus committed Mar 25, 2024
1 parent 97df7bc commit 7703ca2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/repo/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import { networks } from "./helpers";

export async function setupFixtures() {
try {
const allEvmNetworks = await getAllEvmNetworks();
const allEvmNetworks =
process.env.NODE_ENV !== "test" ? await getAllEvmNetworks() : [];

await db.transaction("rw", networks, async () => {
const existingNetworks = await networks.toArray();
Expand All @@ -29,6 +30,8 @@ export async function setupFixtures() {

await networks.bulkPut(mainNets);

if (process.env.NODE_ENV === "test") return;

// Refresh rest
const allNetsMap = new Map(allEvmNetworks.map((n) => [n.chainId, n]));

Expand Down

0 comments on commit 7703ca2

Please sign in to comment.