fix: matchInlineSnapshot when prettier dependencies are mocked#6776
Merged
thymikee merged 1 commit intojestjs:masterfrom Jul 30, 2018
Merged
fix: matchInlineSnapshot when prettier dependencies are mocked#6776thymikee merged 1 commit intojestjs:masterfrom
matchInlineSnapshot when prettier dependencies are mocked#6776thymikee merged 1 commit intojestjs:masterfrom
Conversation
ba542f4 to
161da2e
Compare
matchInlineSnapshot when prettier dependencies mocked
matchInlineSnapshot when prettier dependencies mockedmatchInlineSnapshot work when prettier dependencies are mocked
Codecov Report
@@ Coverage Diff @@
## master #6776 +/- ##
=========================================
Coverage ? 63.68%
=========================================
Files ? 235
Lines ? 9007
Branches ? 4
=========================================
Hits ? 5736
Misses ? 3270
Partials ? 1
Continue to review full report at Codecov.
|
matchInlineSnapshot work when prettier dependencies are mockedmatchInlineSnapshot when prettier dependencies are mocked
thymikee
approved these changes
Jul 30, 2018
SimenB
approved these changes
Jul 30, 2018
This was referenced Jul 30, 2018
thymikee
added a commit
to rhysawilliams2010/jest
that referenced
this pull request
Aug 8, 2018
* upstream/master: (122 commits) fix: don't report promises as open handles (jestjs#6716) support serializing `DocumentFragment` (jestjs#6705) Allow test titles to include array index (jestjs#6414) fix `toContain` suggest to contain equal message (jestjs#6810) fix: testMatch not working with negations (jestjs#6648) Add test cases for jestjs#6744 (jestjs#6772) print stack trace on calls to process.exit (jestjs#6714) Updates SnapshotTesting.md to provide more info. on snapshot scope (jestjs#6735) Mark snapshots as obsolete when moved to an inline snapshot (jestjs#6773) [Docs] Clarified the use of literal values as property matchers in toMatchSnapshot() (jestjs#6807) Update CHANGELOG.md (jestjs#6799) fix changelog entry that is not in 23.4.2 (jestjs#6796) Fix --coverage with --findRelatedTests overwriting collectCoverageFrom options (jestjs#6736) Update testURL default value from about:blank to localhost (jestjs#6792) fix: `matchInlineSnapshot` when prettier dependencies are mocked (jestjs#6776) Fix retryTimes and add e2e regression test (jestjs#6762) Release v23.4.2 Docs/ExpectAPI: Correct docs for `objectContaining` (jestjs#6754) chore(packages/babel-jest) readme (jestjs#6746) docs: noted --coverage aliased by --collectCoverage (jestjs#6741) ...
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes #6702 by seizing to local require prettier in jest-jasmine2. Instead
require(config.prettierPath)is used. This prevents the issue where mocking native modules likepathandfsthat prettier depends on would causetoMatchInlineSnapshotto fail.Test plan
Run the new unit test introduced in this PR.