mirror of
https://github.com/ChainSafe/lodestar.git
synced 2026-01-09 15:48:08 -05:00
* Refactor REST API definitions
* Simplify REST testing
* Bump to fastify 3.x.x
* Return {} in fastify handler to trigger send
* Move REST server to lodestar-api
* Improve REST tests
* Add eventstream test
* Clean up
* Bump versions
* Fix query string format
* Add extra debug routes
* Consume lodestar-api package
* Fix tests
* Revert package.json change
* Add HttpClient test
* Destroy all active requests immediately on close
* Fastify hook handlers must resolve
* Fix fastify hook config args
* Fix parsing of ValidatorId
* Remove e2e script test
* Add docs
* Simplify req declarations
* Review PR
* Update license
29 lines
800 B
TypeScript
29 lines
800 B
TypeScript
import {config} from "@chainsafe/lodestar-config/minimal";
|
|
import {BeaconParams} from "@chainsafe/lodestar-params";
|
|
import {Api, ReqTypes} from "../../src/routes/config";
|
|
import {getClient} from "../../src/client/config";
|
|
import {getRoutes} from "../../src/server/config";
|
|
import {runGenericServerTest} from "../utils/genericServerTest";
|
|
|
|
describe("config", () => {
|
|
runGenericServerTest<Api, ReqTypes>(config, getClient, getRoutes, {
|
|
getDepositContract: {
|
|
args: [],
|
|
res: {
|
|
data: {
|
|
chainId: 1,
|
|
address: Buffer.alloc(20, 1),
|
|
},
|
|
},
|
|
},
|
|
getForkSchedule: {
|
|
args: [],
|
|
res: {data: [config.types.phase0.Fork.defaultValue()]},
|
|
},
|
|
getSpec: {
|
|
args: [],
|
|
res: {data: BeaconParams.defaultValue()},
|
|
},
|
|
});
|
|
});
|