@substrate/api-sidecar
Version:
REST service that makes it easy to interact with blockchain nodes built using Substrate's FRAME framework.
19 lines (18 loc) • 731 B
TypeScript
import { Request } from 'express';
import { RequestHandler } from 'express-serve-static-core';
/**
* Assert that a middleware does not error with the given request.
*
* @param name String for tests to log.
* @param req Express Request containing thing it errors on.
*/
export declare const doesNotErrorWith: (name: string, req: Request, middleware: RequestHandler) => void;
/**
* Assert that a middleware passes `err` to next with the given
* `req`.
*
* @param name String for tests to log.
* @param req Express Request containing thing it errors on.
* @param err Expected error that it passes to next.
*/
export declare const errorsWith: (name: string, req: Request, err: unknown, middleware: RequestHandler) => void;