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

Update package.json settings in README #333

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/jest-enzyme/README.md
Expand Up @@ -19,7 +19,8 @@ If you prefer not to use the environment, you can also do this:
```js
// package.json
"jest": {
"setupFilesAfterEnv": ['./node_modules/jest-enzyme/lib/index.js'],
"testEnvironment": "enzyme",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this something jest supports natively? i'd be very surprised to discover that's the case; it's far more likely that the repo is correct than a 2 year old blog post is.

Copy link
Author

@apennell apennell Jan 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure. I was more concerned with the other line being correct because it tripped me up. Looking back at the history, though, I see that the syntax on that was changed a year ago to what it is currently. It says that setupTestFrameworkScriptFile was deprecated so that's why it was replaced with setupFilesAfterEnv but not why the path was changed to the array. I'll see if I can get it working using that after all.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's likely that jest's format has changed; can you confirm in jest's docs?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah actually I was trying to get this to work on a project that's using an older version of Jest, so I'm thinking that it should work as the docs state once we get that update. Will close out.

"setupFilesAfterEnv": "./node_modules/jest-enzyme/lib/index.js",
}
```

Expand Down