UNPKG

cypress-maildev

Version:

An easy-to-use cypress bunch of commands to use Maildev API for tests messages reception !

25 lines (24 loc) 763 B
export interface RequestConstructorParams { baseUrl: string; } export type Method = "POST" | "GET" | "PUT" | "DELETE"; export default class Request { baseUrl: string; headers: { [key: string]: string; }; constructor({ baseUrl }: RequestConstructorParams); buildOptions(method: Method, path: string): { method: Method; url: string; headers: { Accept: string; }; body: {}; }; request(method: Method, path: string, body?: any): Cypress.Chainable<any>; get(path: string): Cypress.Chainable<any>; post(path: string, body: object): Cypress.Chainable<any>; put(path: string, body: object): Cypress.Chainable<any>; delete(path: string): Cypress.Chainable<any>; }