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

Improvement/update node support to 18 and cypress 10 11 12 #267

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 15 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"presets": [
[
"env",
{
"targets": {
"node": "14.0"
}
}
]
],
"plugins": [
"transform-object-rest-spread"
]
}
5 changes: 5 additions & 0 deletions .changeset/fuzzy-hornets-rescue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'cypress-image-snapshot': patch
---

nothing
5 changes: 5 additions & 0 deletions .changeset/loud-ducks-notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'cypress-image-snapshot': major
---

Major updated for jest-image-snapshot
5 changes: 5 additions & 0 deletions .changeset/red-geckos-flow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'cypress-image-snapshot': minor
---

nothing
19 changes: 19 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"extends": [
"airbnb-base",
"prettier"
],
"plugins": [
"cypress"
],
"rules": {
"class-methods-use-this": "off",
"default-param-last": "off",
"import/no-import-module-exports": ["error", {
"exceptions": ["**/*/reporter.js"]
}]
},
"env": {
"cypress/globals": true
}
}
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,12 @@ node_modules
/*.js

.DS_Store

# JetBrains IDE
.idea/

# VS Code editor
.vscode/

# dont safe snapshot differ file
__diff_output__
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"printWidth": 80,
"semi": true,
"singleQuote": true,
"trailingComma": "es5"
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,3 +193,4 @@ Cypress's screenshot functionality has changed significantly across `3.x.x` vers

- `cypress-image-snapshot@>=1.0.0 <2.0.0` for `cypress@>=3.0.0 <3.0.2`
- `cypress-image-snapshot@>2.0.0` for `cypress@>3.0.2`.
- `cypress-image-snapshot@>5.0.0` for `cypress@>10.0.0`.
3 changes: 3 additions & 0 deletions __tests__/__snapshots__/command.test.js.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`command should fail 1`] = `"received is not a function"`;
2 changes: 1 addition & 1 deletion __tests__/command.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ describe('command', () => {

expect(
boundMatchImageSnapshot(subject, commandOptions)
).rejects.toThrowErrorMatchingSnapshot();
).toThrowErrorMatchingSnapshot();
});

it('should add command', () => {
Expand Down
11 changes: 11 additions & 0 deletions examples/cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const { defineConfig } = require('cypress')

module.exports = defineConfig({
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./cypress/plugins/index.js')(on, config)
},
},
})
1 change: 0 additions & 1 deletion examples/cypress.json

This file was deleted.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added examples/cypress/snapshots/mobile/app.snap.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
26 changes: 19 additions & 7 deletions examples/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "examples",
"version": "0.1.0",
"version": "0.2.0",
"private": true,
"dependencies": {
"concurrently": "^3.6.0",
"react": "^16.4.1",
"react-dom": "^16.4.1",
"react-scripts": "1.1.4"
"concurrently": "7.6.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-scripts": "5.0.1"
},
"scripts": {
"start": "react-scripts start",
Expand All @@ -18,7 +18,19 @@
"examples": "concurrently \"npm run start\" \"npm run cypress:run -- --reporter cypress-image-snapshot/reporter\""
},
"devDependencies": {
"cypress": "^3.1.4",
"cypress-image-snapshot": "^3.0.0"
"cypress": "12.0.2",
"cypress-image-snapshot": "file:.."
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}