Skip to content

Commit

Permalink
fix: prune env when running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sakulstra committed Nov 21, 2024
1 parent 96e9d8a commit b5c85fe
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/__snapshots__/lib.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,42 @@

exports[`should return alchemy supported chain 1 > eth-mainnet 1`] = `"https://eth-mainnet.g.alchemy.com/v2/abc"`;

exports[`should return alchemy supported chain 10 > opt-mainnet 1`] = `"https://opt-mainnet.g.alchemy.com/v2/bwgRUlbz9SAFx_F8G8uHZN5dsD-hj0_Z"`;
exports[`should return alchemy supported chain 10 > opt-mainnet 1`] = `"https://opt-mainnet.g.alchemy.com/v2/abc"`;

exports[`should return alchemy supported chain 56 > bnb-mainnet 1`] = `"https://bnb-mainnet.g.alchemy.com/v2/bwgRUlbz9SAFx_F8G8uHZN5dsD-hj0_Z"`;
exports[`should return alchemy supported chain 56 > bnb-mainnet 1`] = `"https://bnb-mainnet.g.alchemy.com/v2/abc"`;

exports[`should return alchemy supported chain 100 > gnosis-mainnet 1`] = `"https://gnosis-mainnet.g.alchemy.com/v2/bwgRUlbz9SAFx_F8G8uHZN5dsD-hj0_Z"`;
exports[`should return alchemy supported chain 100 > gnosis-mainnet 1`] = `"https://gnosis-mainnet.g.alchemy.com/v2/abc"`;

exports[`should return alchemy supported chain 137 > polygon-mainnet 1`] = `"https://polygon-mainnet.g.alchemy.com/v2/bwgRUlbz9SAFx_F8G8uHZN5dsD-hj0_Z"`;
exports[`should return alchemy supported chain 137 > polygon-mainnet 1`] = `"https://polygon-mainnet.g.alchemy.com/v2/abc"`;

exports[`should return alchemy supported chain 250 > fantom-mainnet 1`] = `"https://fantom-mainnet.g.alchemy.com/v2/bwgRUlbz9SAFx_F8G8uHZN5dsD-hj0_Z"`;
exports[`should return alchemy supported chain 250 > fantom-mainnet 1`] = `"https://fantom-mainnet.g.alchemy.com/v2/abc"`;

exports[`should return alchemy supported chain 324 > zksync-mainnet 1`] = `"https://zksync-mainnet.g.alchemy.com/v2/bwgRUlbz9SAFx_F8G8uHZN5dsD-hj0_Z"`;
exports[`should return alchemy supported chain 324 > zksync-mainnet 1`] = `"https://zksync-mainnet.g.alchemy.com/v2/abc"`;

exports[`should return alchemy supported chain 1088 > metis-mainnet 1`] = `"https://metis-mainnet.g.alchemy.com/v2/bwgRUlbz9SAFx_F8G8uHZN5dsD-hj0_Z"`;
exports[`should return alchemy supported chain 1088 > metis-mainnet 1`] = `"https://metis-mainnet.g.alchemy.com/v2/abc"`;

exports[`should return alchemy supported chain 1101 > polygonzkevm-mainnet 1`] = `"https://polygonzkevm-mainnet.g.alchemy.com/v2/bwgRUlbz9SAFx_F8G8uHZN5dsD-hj0_Z"`;
exports[`should return alchemy supported chain 1101 > polygonzkevm-mainnet 1`] = `"https://polygonzkevm-mainnet.g.alchemy.com/v2/abc"`;

exports[`should return alchemy supported chain 4002 > fantom-testnet 1`] = `"https://fantom-testnet.g.alchemy.com/v2/abc"`;

exports[`should return alchemy supported chain 8453 > base-mainnet 1`] = `"https://base-mainnet.g.alchemy.com/v2/bwgRUlbz9SAFx_F8G8uHZN5dsD-hj0_Z"`;
exports[`should return alchemy supported chain 8453 > base-mainnet 1`] = `"https://base-mainnet.g.alchemy.com/v2/abc"`;

exports[`should return alchemy supported chain 42161 > arb-mainnet 1`] = `"https://arb-mainnet.g.alchemy.com/v2/bwgRUlbz9SAFx_F8G8uHZN5dsD-hj0_Z"`;
exports[`should return alchemy supported chain 42161 > arb-mainnet 1`] = `"https://arb-mainnet.g.alchemy.com/v2/abc"`;

exports[`should return alchemy supported chain 43113 > avax-fuji 1`] = `"https://avax-fuji.g.alchemy.com/v2/abc"`;

exports[`should return alchemy supported chain 43114 > avax-mainnet 1`] = `"https://avax-mainnet.g.alchemy.com/v2/bwgRUlbz9SAFx_F8G8uHZN5dsD-hj0_Z"`;
exports[`should return alchemy supported chain 43114 > avax-mainnet 1`] = `"https://avax-mainnet.g.alchemy.com/v2/abc"`;

exports[`should return alchemy supported chain 80002 > polygon-amoy 1`] = `"https://polygon-amoy.g.alchemy.com/v2/abc"`;

exports[`should return alchemy supported chain 84532 > base-sepolia 1`] = `"https://base-sepolia.g.alchemy.com/v2/bwgRUlbz9SAFx_F8G8uHZN5dsD-hj0_Z"`;
exports[`should return alchemy supported chain 84532 > base-sepolia 1`] = `"https://base-sepolia.g.alchemy.com/v2/abc"`;

exports[`should return alchemy supported chain 421614 > arb-sepolia 1`] = `"https://arb-sepolia.g.alchemy.com/v2/abc"`;

exports[`should return alchemy supported chain 534351 > scroll-sepolia 1`] = `"https://scroll-sepolia.g.alchemy.com/v2/abc"`;

exports[`should return alchemy supported chain 534352 > scroll-mainnet 1`] = `"https://scroll-mainnet.g.alchemy.com/v2/bwgRUlbz9SAFx_F8G8uHZN5dsD-hj0_Z"`;
exports[`should return alchemy supported chain 534352 > scroll-mainnet 1`] = `"https://scroll-mainnet.g.alchemy.com/v2/abc"`;

exports[`should return alchemy supported chain 11155111 > eth-sepolia 1`] = `"https://eth-sepolia.g.alchemy.com/v2/bwgRUlbz9SAFx_F8G8uHZN5dsD-hj0_Z"`;
exports[`should return alchemy supported chain 11155111 > eth-sepolia 1`] = `"https://eth-sepolia.g.alchemy.com/v2/abc"`;

exports[`should return alchemy supported chain 11155420 > opt-sepolia 1`] = `"https://opt-sepolia.g.alchemy.com/v2/abc"`;
2 changes: 2 additions & 0 deletions src/lib.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import {
getRPCUrl,
} from "./lib";

Object.keys(process.env).map((key) => delete process.env[key]);

describe("lib", () => {
it("should use env var if given", () => {
process.env.RPC_MAINNET = "https://rpc.mainnet.com";
Expand Down

0 comments on commit b5c85fe

Please sign in to comment.