Skip to content

Commit

Permalink
Improve description line when assertion fails: part 2 (#5512)
Browse files Browse the repository at this point in the history
* Improve description line when assertion fails: part 2

* Update changelog and one more snapshot plus fix Windows test

* Update snapshot in failures integration test
  • Loading branch information
pedrottimark authored and cpojer committed Feb 23, 2018
1 parent 0d1420c commit 196d9b8
Show file tree
Hide file tree
Showing 7 changed files with 503 additions and 848 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,10 @@
## master

### Features

* `[jest-matcher-utils]` Add `isNot` option to `matcherHint` function
([#5512](https://github.com/facebook/jest/pull/5512))

### Fixes

* `[jest-resolve]` Update node module resolution algorithm to correctly handle
Expand Down Expand Up @@ -150,6 +155,8 @@
* `[diff-sequences]` New package compares items in two sequences to find a
**longest common subsequence**.
([#5407](https://github.com/facebook/jest/pull/5407))
* `[jest-matcher-utils]` Add `comment` option to `matcherHint` function
([#5437](https://github.com/facebook/jest/pull/5437))
* `[jest-config]` Allow lastComit and changedFilesWithAncestor via JSON config
([#5476](https://github.com/facebook/jest/pull/5476))
* `[jest-util]` Add deletion to `process.env` as well
Expand Down
Expand Up @@ -38,8 +38,7 @@ exports[`not throwing Error objects 4`] = `
✕ throws when there are not assertions
● .assertions() › throws
expect(received).toBeTruthy()
Expected value to be truthy, instead received
false
Received: false
11 | const throws = () => {
12 | expect.assertions(2);
> 13 | expect(false).toBeTruthy();
Expand All @@ -52,8 +51,7 @@ exports[`not throwing Error objects 4`] = `
Expected two assertions to be called but received one assertion call.
● .assertions() › throws on redeclare of assertion count
expect(received).toBeTruthy()
Expected value to be truthy, instead received
false
Received: false
15 | const redeclare = () => {
16 | expect.assertions(1);
> 17 | expect(false).toBeTruthy();
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/__tests__/jasmine_async.test.js
Expand Up @@ -138,7 +138,7 @@ describe('async jasmine', () => {

expect(result.status).toBe(1);
expect(result.json.testResults[0].message).toEqual(
expect.stringContaining('Expected value to be truthy, instead received'),
expect.stringContaining('Received:'),
);
});

Expand Down

0 comments on commit 196d9b8

Please sign in to comment.