Skip to content

Commit

Permalink
expect: Improve report when assertion fails, part 4 (jestjs#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 captain-yossarian committed Jul 18, 2019
1 parent 119dbc4 commit 80231ee
Show file tree
Hide file tree
Showing 14 changed files with 793 additions and 542 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
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
@@ -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</>"
`;

0 comments on commit 80231ee

Please sign in to comment.