Skip to content

chore(breaking): bump Jest to 26 #128

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

Merged
merged 3 commits into from
May 7, 2020
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: node_js
node_js:
- '12'
- '8'
- '10'
before_install:
- yarn global add greenkeeper-lockfile@1
install: yarn --ignore-engines
Expand Down
2 changes: 1 addition & 1 deletion __tests__/__snapshots__/snapshotDiff.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ exports[`diffs short strings 1`] = `

exports[`failed optional deps throws with sensible message on missing react-test-renderer 1`] = `
"Failed to load optional module \\"react-test-renderer\\". If you need to compare React elements, please add \\"react-test-renderer\\" to your project's dependencies.
Cannot find module 'non-existent-module-for-testing' from 'snapshotDiff.test.js'"
Cannot find module 'non-existent-module-for-testing' from '__tests__/snapshotDiff.test.js'"
`;

exports[`shows diff when comparing React fragments of varying length 1`] = `
Expand Down
6 changes: 5 additions & 1 deletion __tests__/snapshotDiff.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ const noIndentB = `
`;

type Props = {
test: string,
test?: string,
unnamedFunction?: () => void,
unnamedJestMock?: () => void,
namedJestMock?: () => void,
withSecond?: boolean,
};

class Component extends React.Component<Props> {
Expand Down
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ module.exports = {
presets: [
'@babel/preset-react',
'@babel/preset-flow',
['@babel/preset-env', { targets: { node: 6 } }],
['@babel/preset-env', { targets: { node: '10' } }],
],
};
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@
"watch": "babel -w src --out-dir build"
},
"repository": "https://github.com/thymikee/snapshot-diff",
"engines": {
"node": ">=10"
},
"peerDependencies": {
"jest": ">=16"
},
"dependencies": {
"jest-diff": "^25.1.0",
"jest-snapshot": "^25.1.0",
"pretty-format": "^25.1.0"
"jest-diff": "^26.0.1",
"jest-snapshot": "^26.0.1",
"pretty-format": "^26.0.1"
},
"devDependencies": {
"@babel/cli": "^7.7.0",
Expand All @@ -35,7 +38,7 @@
"enzyme-to-json": "^3.4.0",
"eslint": "^6.6.0",
"flow-bin": "^0.123.0",
"jest": "^24.0.0",
"jest": "^26.0.1",
"react": "^16.13.1",
"react-dom": "16.13.1",
"react-test-renderer": "^16.13.1"
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function diffStrings(valueA: any, valueB: any, options: Options) {
contextLines: options.contextLines,
aAnnotation: options.aAnnotation,
bAnnotation: options.bAnnotation,
...(!options.colors ? noDiffColors : {})
...(!options.colors ? noDiffColors : {}),
});
}

Expand Down
Loading