Files
AutistMask/tests/constants.test.js
sneak 065f0eaa81
Todas las comprobaciones han sido exitosas
check / check (push) Successful in 10s
Add project scaffolding
Makefile, Dockerfile, CI workflow, prettier config, manifests for
Chrome (MV3) and Firefox (MV2), source directory structure, and
minimal test suite. All checks pass.
2026-02-24 09:48:21 +07:00

30 líneas
895 B
JavaScript

const {
ETHEREUM_MAINNET_CHAIN_ID,
DEFAULT_RPC_URL,
BIP44_ETH_PATH,
ERC20_ABI,
} = require("../src/shared/constants");
describe("constants", () => {
test("exports expected chain ID", () => {
expect(ETHEREUM_MAINNET_CHAIN_ID).toBe("0x1");
});
test("exports a default RPC URL", () => {
expect(typeof DEFAULT_RPC_URL).toBe("string");
expect(DEFAULT_RPC_URL.startsWith("https://")).toBe(true);
});
test("exports BIP-44 Ethereum derivation path", () => {
expect(BIP44_ETH_PATH).toBe("m/44'/60'/0'/0");
});
test("exports ERC-20 ABI with expected functions", () => {
expect(Array.isArray(ERC20_ABI)).toBe(true);
expect(ERC20_ABI.length).toBeGreaterThan(0);
const joined = ERC20_ABI.join(" ");
expect(joined).toContain("balanceOf");
expect(joined).toContain("transfer");
});
});