UNPKG

jest-axios-snapshot

Version:
19 lines (18 loc) 684 B
import { AxiosResponse } from 'axios'; declare type AxiosResponseTransformer = (response: AxiosResponse) => AxiosResponse; /** * Remove the date header from an axios response. * * @param response - The axios repons to transform. * @returns The response without a `datw` header. */ export declare function defaultTransformer(response: AxiosResponse): AxiosResponse; /** * Set a function used to transform an axios response before serializing. * * The default transformer removes the `date` header. * * @param transformer - A function to transform the axios response. */ export declare function setResponseTransformer(transformer: AxiosResponseTransformer): void; export {};