Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jest-diff: Replace diff with diff-sequences package #6961

Merged
merged 6 commits into from
Jan 11, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## master

### Features

- Breaking Change: `[jest-diff]` Replace `diff` with `diff-sequences` package ([#6961](https://github.com/facebook/jest/pull/6961))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use the format:

- `[jest-diff]` [**BREAKING**] blablabla


## 23.6.0

### Features
Expand Down
24 changes: 12 additions & 12 deletions packages/expect/src/__tests__/__snapshots__/matchers.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1805,9 +1805,9 @@ Difference:
<red>+ Received</>

<dim> Array [</>
<red>+ 1,</>
<dim> 2,</>
<green>- 1,</>
<green>- 2,</>
<dim> 1,</>
<red>+ 2,</>
<dim> ]</>"
`;

Expand Down Expand Up @@ -2034,9 +2034,9 @@ Difference:
<red>+ Received</>

<dim> Immutable.List [</>
<red>+ 1,</>
<dim> 2,</>
<green>- 1,</>
<green>- 2,</>
<dim> 1,</>
<red>+ 2,</>
<dim> ]</>"
`;

Expand Down Expand Up @@ -2188,9 +2188,9 @@ Difference:
<red>+ Received</>

<dim> Immutable.OrderedMap {</>
<red>+ 1: \\"one\\",</>
<dim> 2: \\"two\\",</>
<green>- 1: \\"one\\",</>
<green>- 2: \\"two\\",</>
<dim> 1: \\"one\\",</>
<red>+ 2: \\"two\\",</>
<dim> }</>"
`;

Expand Down Expand Up @@ -2226,9 +2226,9 @@ Difference:
<red>+ Received</>

<dim> Immutable.OrderedSet [</>
<red>+ 1,</>
<dim> 2,</>
<green>- 1,</>
<green>- 2,</>
<dim> 1,</>
<red>+ 2,</>
<dim> ]</>"
`;

Expand Down
2 changes: 1 addition & 1 deletion packages/jest-diff/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"main": "build/index.js",
"dependencies": {
"chalk": "^2.0.1",
"diff": "^3.2.0",
"diff-sequences": "^23.6.0",
"jest-get-type": "^22.1.0",
"pretty-format": "^23.6.0"
}
Expand Down
38 changes: 19 additions & 19 deletions packages/jest-diff/src/__tests__/__snapshots__/diff.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ exports[`collapses big diffs to patch format 1`] = `
<dim> 6,</>
<dim> 7,</>
<dim> 8,</>
<red>+ 10,</>
<dim> 9,</>
<green>- 10,</>
<green>- 9,</>
<dim> 10,</>
<red>+ 9,</>
<dim> ],</>
<dim> }</>"
`;
Expand Down Expand Up @@ -109,9 +109,9 @@ exports[`context number of lines: -1 (5 default) 1`] = `
<dim> 6,</>
<dim> 7,</>
<dim> 8,</>
<red>+ 10,</>
<dim> 9,</>
<green>- 10,</>
<green>- 9,</>
<dim> 10,</>
<red>+ 9,</>
<dim> ],</>
<dim> }</>"
`;
Expand All @@ -120,10 +120,10 @@ exports[`context number of lines: 0 1`] = `
"<green>- Expected</>
<red>+ Received</>

<yellow>@@ -11,0 +11,1 @@</>
<red>+ 10,</>
<yellow>@@ -12,1 +13,0 @@</>
<green>- 10,</>"
<yellow>@@ -11,1 +11,0 @@</>
<green>- 9,</>
<yellow>@@ -13,0 +12,1 @@</>
<red>+ 9,</>"
`;

exports[`context number of lines: 1 1`] = `
Expand All @@ -132,9 +132,9 @@ exports[`context number of lines: 1 1`] = `

<yellow>@@ -10,4 +10,4 @@</>
<dim> 8,</>
<red>+ 10,</>
<dim> 9,</>
<green>- 10,</>
<green>- 9,</>
<dim> 10,</>
<red>+ 9,</>
<dim> ],</>"
`;

Expand All @@ -145,9 +145,9 @@ exports[`context number of lines: 2 1`] = `
<yellow>@@ -9,6 +9,6 @@</>
<dim> 7,</>
<dim> 8,</>
<red>+ 10,</>
<dim> 9,</>
<green>- 10,</>
<green>- 9,</>
<dim> 10,</>
<red>+ 9,</>
<dim> ],</>
<dim> }</>"
`;
Expand All @@ -162,9 +162,9 @@ exports[`context number of lines: null (5 default) 1`] = `
<dim> 6,</>
<dim> 7,</>
<dim> 8,</>
<red>+ 10,</>
<dim> 9,</>
<green>- 10,</>
<green>- 9,</>
<dim> 10,</>
<red>+ 9,</>
<dim> ],</>
<dim> }</>"
`;
Expand Down
Loading