UNPKG

@starknet-react/core

Version:

Starknet React is a collection of React hooks for Starknet.

19 lines (15 loc) 481 B
import { type Chain, mainnet } from "@starknet-react/chains"; import { describe, expect, it } from "vitest"; import { jsonRpcProvider } from "./jsonrpc"; function rpc(chain: Chain) { return { nodeUrl: `https://${chain.network}.example.com`, }; } describe("jsonRpcProvider", () => { it("returns a public rpc endpoint", () => { expect( jsonRpcProvider({ rpc })(mainnet)?.channel.nodeUrl, ).toMatchInlineSnapshot('"https://mainnet.example.com"'); }); });