Skip to content

Commit

Permalink
Fix example used in custom environment docs (#8617)
Browse files Browse the repository at this point in the history
  • Loading branch information
rogeliog authored and SimenB committed Jun 28, 2019
1 parent 47da9cf commit 1b2dbd5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
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
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
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

0 comments on commit 1b2dbd5

Please sign in to comment.