We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
expect(snapshotDiff("foo", "bar")).toMatchSnapshot();
Received value Snapshot Diff: null
It seems adding a new line to the end of both arguments results in a valid snapshot diff.
expect(snapshotDiff("foo" + "\n", "bar" + "\n")).toMatchSnapshot();
Received value Snapshot Diff: - First value + Second value - foo + bar
The text was updated successfully, but these errors were encountered:
Hm, maybe we should add the newline implicitly if there's none? I'm not sure why it doesn't work in general though, anyone mind investigating?
Sorry, something went wrong.
Let’s see if it works correctly after #21 because of jestjs/jest#4520
EDIT: It looks like it is necessary to add newline if both strings are single line, see: https://github.com/facebook/jest/blob/master/packages/jest-diff/src/index.js#L89-L95
No branches or pull requests
Code:
expect(snapshotDiff("foo", "bar")).toMatchSnapshot();
Result:
It seems adding a new line to the end of both arguments results in a valid snapshot diff.
Code
expect(snapshotDiff("foo" + "\n", "bar" + "\n")).toMatchSnapshot();
Result
The text was updated successfully, but these errors were encountered: