- shared: Ethereum Sepolia chain + addresses load from deployments/sepolia.json (default) - web/agent/api: default network -> Sepolia, RPC config; .env.example updated - typecheck green across shared/web/agent/api Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
26 lines
710 B
TypeScript
26 lines
710 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import {
|
|
BASE_SEPOLIA_CHAIN_ID,
|
|
ETHEREUM_SEPOLIA_CHAIN_ID,
|
|
EXPECTED_CHAIN_ID,
|
|
env,
|
|
isEnvValid,
|
|
isUnexpectedChain,
|
|
} from "@/lib/env";
|
|
|
|
describe("client env (with test setup values)", () => {
|
|
it("is valid", () => {
|
|
expect(isEnvValid).toBe(true);
|
|
});
|
|
it("targets the Ethereum Sepolia chain id", () => {
|
|
expect(ETHEREUM_SEPOLIA_CHAIN_ID).toBe(11155111);
|
|
expect(EXPECTED_CHAIN_ID).toBe(11155111);
|
|
expect(BASE_SEPOLIA_CHAIN_ID).toBe(84532);
|
|
expect(env.chainId).toBe(11155111);
|
|
expect(isUnexpectedChain).toBe(false);
|
|
});
|
|
it("parses the agent api url", () => {
|
|
expect(env.agentApiUrl).toMatch(/^https?:\/\//);
|
|
});
|
|
});
|