jest-playwright
jest-playwright copied to clipboard
Pass `context` to `PlaywrightEnvironment`'s parent (`RootEnv`)
Fixes #819
This is how jest recommends creating your own test environment (jest docs):
// my-custom-environment
const NodeEnvironment = require('jest-environment-node').TestEnvironment;
class CustomEnvironment extends NodeEnvironment {
constructor(config, context) {
super(config, context); // see context here
console.log(config.globalConfig);
console.log(config.projectConfig);
this.testPath = context.testPath;
this.docblockPragmas = context.docblockPragmas;
}