next-page-tester
Version:
Enable DOM integration testing on Next.js pages
14 lines (13 loc) • 747 B
TypeScript
import type { NextPageContext, GetServerSidePropsContext, GetStaticPropsContext } from 'next';
import type { ExtendedOptions, FoundPageObject, PageObject } from '../commonTypes';
export declare function makeGetInitialPropsContext({ pageObject, options: { req: reqMocker, res: resMocker, previousRoute, env }, }: {
pageObject: PageObject;
options: ExtendedOptions;
}): NextPageContext;
export declare function makeGetServerSidePropsContext({ pageObject, options, }: {
pageObject: FoundPageObject;
options: ExtendedOptions;
}): GetServerSidePropsContext<typeof pageObject.params>;
export declare function makeStaticPropsContext({ pageObject, }: {
pageObject: FoundPageObject;
}): GetStaticPropsContext<typeof pageObject.params>;