Open lasithdilshan20 opened 2 years ago
I faced the same issue. Which cypres version do you use? I use cypress: 10.1.0
so that I added following code to my cypress.config.ts
file and it was solved for me.
// cypress.config.ts
import {addMatchImageSnapshotPlugin} from 'cypress-image-snapshot/plugin';
export default defineConfig({
...restConfigs
setupNodeEvents(on, config) {
addMatchImageSnapshotPlugin(on, config);
},
...restConfigs
});
Little addition: you need to set setupNodeEvents
inside e2e
or component
config sections as described in Cypress documentation.
Has this been resolved? I am using Cypress 9 and still have this issue
that's not an issue. you just need properly configure your plugin, instructions already given above.
I ran into this as well and thought it might help to share the full cypress.config.js
I have:
const { defineConfig } = require('cypress')
const { addMatchImageSnapshotPlugin } = require('cypress-image-snapshot/plugin')
module.exports = defineConfig({
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
addMatchImageSnapshotPlugin(on, config)
},
}
})
As you can see, there's no need to create a plugins
folder with configuration anymore.
Cypress version: 10.3.1
Kudos, this just fixed my error
Thanks you so much! )) (c)0990. 4599===2sd
Hi, I'm using image snapshot lib and I got the following issue with it.