Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix example used in custom environment docs #8617

Merged
merged 2 commits into from
Jun 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
- `[docs]` Add example to `jest.mock` for mocking ES6 modules with the `factory` parameter ([#8550](https://github.com/facebook/jest/pull/8550))
- `[docs]` Add information about using `jest.doMock` with ES6 imports ([#8573](https://github.com/facebook/jest/pull/8573))
- `[docs]` Fix variable name in custom-matcher-api code example ([#8582](https://github.com/facebook/jest/pull/8582))
- `[docs]` Fix example used in custom environment docs ([#8617](https://github.com/facebook/jest/pull/8617))

### Performance

Expand Down
6 changes: 3 additions & 3 deletions docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -875,10 +875,10 @@ Example:
const NodeEnvironment = require('jest-environment-node');

class CustomEnvironment extends NodeEnvironment {
constructor(config, {testPath, docblockPragmas}) {
constructor(config, context) {
super(config, context);
this.testPath = testPath;
this.docblockPragmas = docblockPragmas;
this.testPath = context.testPath;
this.docblockPragmas = context.docblockPragmas;
}

async setup() {
Expand Down
6 changes: 3 additions & 3 deletions website/versioned_docs/version-24.8/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -876,10 +876,10 @@ Example:
const NodeEnvironment = require('jest-environment-node');

class CustomEnvironment extends NodeEnvironment {
constructor(config, {testPath, docblockPragmas}) {
constructor(config, context) {
super(config, context);
this.testPath = testPath;
this.docblockPragmas = docblockPragmas;
this.testPath = context.testPath;
this.docblockPragmas = context.docblockPragmas;
}

async setup() {
Expand Down