mirror of
https://github.com/datahaven-xyz/datahaven
synced 2026-05-23 17:28:23 +00:00
This PR adds the basic framework for E2E and the greater typescript testing framework for the repo. ### Contents - CI workflow for running E2E tests on push to main, PRs and manual - Test suite for E2E - Currently only read-only tests - Using `bun:test` for time being but we can always change in future - We are using the logging library `pino` so we can help with debugging - set environment variable `LOG_LEVEL` to get extra information on helpers - Local `utils` namespace for all our test suites for easy importing - Has helpers which interact with both the docker driver and also blockscout backend - Allows us to fetch deployed smart contracts by their name or address and interact with them --------- Co-authored-by: Facundo Farall <37149322+ffarall@users.noreply.github.com>
11 lines
397 B
TypeScript
11 lines
397 B
TypeScript
import { CONTAINER_NAMES, getPublicPort } from "utils";
|
|
|
|
export const getRPCUrl = async (): Promise<string> => {
|
|
const publicPort = await getPublicPort(CONTAINER_NAMES.EL1, 8545);
|
|
return `http://127.0.0.1:${publicPort}`;
|
|
};
|
|
|
|
export const getWSUrl = async (): Promise<string> => {
|
|
const publicPort = await getPublicPort(CONTAINER_NAMES.EL1, 8546);
|
|
return `ws://127.0.0.1:${publicPort}`;
|
|
};
|