Installation
npm install --save @types/jest-environment-puppeteer
Summary
This package contains type definitions for jest-environment-puppeteer (https://github.com/smooth-code/jest-puppeteer/tree/master/packages/jest-environment-puppeteer).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jest-environment-puppeteer.
import NodeEnvironment = require("jest-environment-node");
import { Browser, BrowserContext, Page } from "puppeteer";
import { Context } from "vm";
interface JestPuppeteer {
resetPage(): Promise<void>;
resetBrowser(): Promise<void>;
debug(): Promise<void>;
}
interface Global extends NonNullable<NodeEnvironment["global"]> {
browser: Browser;
context: Context;
page: Page;
jestPuppeteer: JestPuppeteer;
}
declare class PuppeteerEnvironment extends NodeEnvironment {
global: Global;
}
declare global {
const browser: Browser;
const context: BrowserContext;
const page: Page;
const jestPuppeteer: JestPuppeteer;
}
export = PuppeteerEnvironment;
Additional Details
Credits
These definitions were written by Ifiok Jr..