Skip to content

Update jest.md#2499

Draft
wyatt-troia wants to merge 1 commit intoenzymejs:masterfrom
wyatt-troia:patch-2
Draft

Update jest.md#2499
wyatt-troia wants to merge 1 commit intoenzymejs:masterfrom
wyatt-troia:patch-2

Conversation

@wyatt-troia
Copy link
Copy Markdown

Add note about skipping setting 'setupFilesAfterEnv' if using create-react-app. If you try to do so when using create-react-app, you get the following error:

(base) ➜  component-library git:(setup) ✗ npm run test

> component-library@0.1.0 test
> react-scripts test

We detected setupFilesAfterEnv in your package.json.

Remove it from Jest configuration, and put the initialization code in src/setupTests.js.
This file will be loaded automatically.

Add note about skipping setting 'setupFilesAfterEnv' if using create-react-app. If you try to do so when using create-react-app, you get the following error:

```
(base) ➜  component-library git:(setup) ✗ npm run test

> component-library@0.1.0 test
> react-scripts test

We detected setupFilesAfterEnv in your package.json.

Remove it from Jest configuration, and put the initialization code in src/setupTests.js.
This file will be loaded automatically.
```
@ljharb
Copy link
Copy Markdown
Member

ljharb commented Feb 5, 2021

Skipping this step means your enzyme adapter isn't configured. What's the workaround?

@ljharb ljharb added the docs label Feb 5, 2021
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 5, 2021

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 8.60%. Comparing base (cdfb1c6) to head (6017756).
⚠️ Report is 100 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (cdfb1c6) and HEAD (6017756). Click for more details.

HEAD has 79 uploads less than BASE
Flag BASE (cdfb1c6) HEAD (6017756)
100 21
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #2499       +/-   ##
==========================================
- Coverage   96.12%   8.60%   -87.53%     
==========================================
  Files          49      16       -33     
  Lines        4004    1802     -2202     
  Branches     1123     498      -625     
==========================================
- Hits         3849     155     -3694     
- Misses        155    1647     +1492     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ljharb ljharb marked this pull request as draft March 26, 2021 15:08
@ljharb ljharb force-pushed the master branch 3 times, most recently from 43eb75e to 39e6b1f Compare November 3, 2022 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants