Skip to content

Commit

Permalink
expect: Improve report when assertion fails, part 4 (#7241)
Browse files Browse the repository at this point in the history
* expect: Improve report when assertion fails, part 4

* Added snapshot test for toHaveLength expected length

* Fix prettier lint error

* Made improvements requested by thymikee

* Make improvements suggested by SimenB

* Update CHANGELOG.md

* Save the change to resolve the other merge conflict

* Deleted assertion_counts.test.js.snap

* Replace cannot with must not

* Fix prettier lint error
  • Loading branch information
pedrottimark authored and thymikee committed Dec 18, 2018
1 parent b21ab21 commit 21733c3
Show file tree
Hide file tree
Showing 14 changed files with 793 additions and 542 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
- `[jest-haste-map]` Add `getCacheFilePath` to get the path to the cache file for a `HasteMap` instance ([#7217](https://github.com/facebook/jest/pull/7217))
- `[jest-runtime]` Remove `cacheDirectory` from `ignorePattern` for `HasteMap` if not necessary ([#7166](https://github.com/facebook/jest/pull/7166))
- `[jest-validate]` Add syntax to validate multiple permitted types ([#7207](https://github.com/facebook/jest/pull/7207))
- `[jest-config]` Accept an array as as well as a string for `testRegex` ([#7209](https://github.com/facebook/jest/pull/7209))
- `[jest-config]` Accept an array as as well as a string for `testRegex`([#7209]https://github.com/facebook/jest/pull/7209))
- `[expect/jest-matcher-utils]` Improve report when assertion fails, part 4 ([#7241](https://github.com/facebook/jest/pull/7241))
- `[expect]` Check constructor equality in .toStrictEqual() ([#7005](https://github.com/facebook/jest/pull/7005))
- `[jest-util]` Add `jest.getTimerCount()` to get the count of scheduled fake timers ([#7285](https://github.com/facebook/jest/pull/7285))
- `[jest-config]` Add `dependencyExtractor` option to use a custom module to extract dependencies from files ([#7313](https://github.com/facebook/jest/pull/7313), [#7349](https://github.com/facebook/jest/pull/7349), [#7350](https://github.com/facebook/jest/pull/7350))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`.hasAssertions() throws if expected is not undefined 1`] = `
"<dim>expect(</><red>received</><dim>)[.not].hasAssertions(</><dim>)</>
<bold>Matcher error</>: <green>expected</> value must be omitted or undefined
Expected has type: number
Expected has value: <green>2</>"
`;
Loading

0 comments on commit 21733c3

Please sign in to comment.