Skip to content
This repository was archived by the owner on Sep 11, 2025. It is now read-only.

Conversation

juan-fernandez
Copy link

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;
  }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pass context to the parent of PlaywrightEnvironment
1 participant