Skip to content

Commit 8d47ffa

Browse files
authored
expect, jest-matcher-utils: Display change counts in annotation lines (#9035)
* expect, jest-matcher-utils: Display change counts in annotation lines * Update CHANGELOG.md
1 parent f15ada4 commit 8d47ffa

File tree

8 files changed

+160
-157
lines changed

8 files changed

+160
-157
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- `[babel-plugin-jest-hoist]` Add `BigInt` to `WHITELISTED_IDENTIFIERS` ([#8382](https://github.com/facebook/jest/pull/8382))
77
- `[babel-preset-jest]` Add `@babel/plugin-syntax-bigint` ([#8382](https://github.com/facebook/jest/pull/8382))
88
- `[expect]` Add `BigInt` support to `toBeGreaterThan`, `toBeGreaterThanOrEqual`, `toBeLessThan` and `toBeLessThanOrEqual` ([#8382](https://github.com/facebook/jest/pull/8382))
9+
- `[expect, jest-matcher-utils]` Display change counts in annotation lines ([#9035](https://github.com/facebook/jest/pull/9035))
910
- `[jest-config]` Throw the full error message and stack when a Jest preset is missing a dependency ([#8924](https://github.com/facebook/jest/pull/8924))
1011
- `[jest-config]` [**BREAKING**] Set default display name color based on runner ([#8689](https://github.com/facebook/jest/pull/8689))
1112
- `[jest-diff]` Add options for colors and symbols ([#8841](https://github.com/facebook/jest/pull/8841))

e2e/__tests__/__snapshots__/failures.test.ts.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ FAIL __tests__/asyncFailures.test.js
288288
289289
expect(received).resolves.toEqual(expected) // deep equality
290290
291-
- Expected
292-
+ Received
291+
- Expected - 1
292+
+ Received + 1
293293
294294
Object {
295295
- "baz": "bar",
@@ -310,8 +310,8 @@ FAIL __tests__/asyncFailures.test.js
310310
311311
expect(received).rejects.toEqual(expected) // deep equality
312312
313-
- Expected
314-
+ Received
313+
- Expected - 1
314+
+ Received + 1
315315
316316
Object {
317317
- "baz": "bar",

packages/expect/src/__tests__/__snapshots__/extend.test.js.snap

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
exports[`defines asymmetric unary matchers 1`] = `
44
<d>expect(</><r>received</><d>).</>toEqual<d>(</><g>expected</><d>) // deep equality</>
55
6-
<g>- Expected</>
7-
<r>+ Received</>
6+
<g>- Expected - 1</>
7+
<r>+ Received + 1</>
88
99
<d> Object {</>
1010
<g>- "value": toBeDivisibleBy<2>,</>
@@ -15,8 +15,8 @@ exports[`defines asymmetric unary matchers 1`] = `
1515
exports[`defines asymmetric unary matchers that can be prefixed by not 1`] = `
1616
<d>expect(</><r>received</><d>).</>toEqual<d>(</><g>expected</><d>) // deep equality</>
1717
18-
<g>- Expected</>
19-
<r>+ Received</>
18+
<g>- Expected - 1</>
19+
<r>+ Received + 1</>
2020
2121
<d> Object {</>
2222
<g>- "value": not.toBeDivisibleBy<2>,</>
@@ -27,8 +27,8 @@ exports[`defines asymmetric unary matchers that can be prefixed by not 1`] = `
2727
exports[`defines asymmetric variadic matchers 1`] = `
2828
<d>expect(</><r>received</><d>).</>toEqual<d>(</><g>expected</><d>) // deep equality</>
2929
30-
<g>- Expected</>
31-
<r>+ Received</>
30+
<g>- Expected - 1</>
31+
<r>+ Received + 1</>
3232
3333
<d> Object {</>
3434
<g>- "value": toBeWithinRange<4, 11>,</>
@@ -39,8 +39,8 @@ exports[`defines asymmetric variadic matchers 1`] = `
3939
exports[`defines asymmetric variadic matchers that can be prefixed by not 1`] = `
4040
<d>expect(</><r>received</><d>).</>toEqual<d>(</><g>expected</><d>) // deep equality</>
4141
42-
<g>- Expected</>
43-
<r>+ Received</>
42+
<g>- Expected - 1</>
43+
<r>+ Received + 1</>
4444
4545
<d> Object {</>
4646
<g>- "value": not.toBeWithinRange<1, 3>,</>

0 commit comments

Comments
 (0)