jaredpalmer / cypress-image-snapshot

Catch visual regressions in Cypress
MIT License
891 stars 158 forks source link

Cannot read property '1' of null at Object.matchImageSnapshotPlugin [as handler] #77

Closed mcmc4519 closed 5 years ago

mcmc4519 commented 5 years ago

Hi! On run test, and in test I run cy.matchImageSnapshot(category_withfilters${label});

I have error, http://prntscr.com/n7jec5

Can you help me?

mcmc4519 commented 5 years ago

somebody have same error?

jackjocross commented 5 years ago

@mcmc4519 can you share your cypress.json configuration? I'm wondering if there is a configuration edge case we didn't handle.

mcmc4519 commented 5 years ago

@mcmc4519 can you share your cypress.json configuration? I'm wondering if there is a configuration edge case we didn't handle.

@crosscompile

image

jackjocross commented 5 years ago

I think this issue should be fixed in v3.0.2. Feel free to reopen if you're still facing the issue.

fshchudlo commented 5 years ago

@crosscompile Hello. I see same error after update to 3.0.2 (and 3.1.0). No matter with or without screenshotsFolder option specified.

mfolnovic commented 5 years ago

It seems this fix broke windows support - you are trying to match with Regex that contains \.

jackjocross commented 5 years ago

Sorry about that, looks like the regex used doesn't account for Window's file paths.

jackjocross commented 5 years ago

Released a fix in v3.1.1. I don't have a Windows computer handy to fully test if someone is able to confirm the fix works.

fshchudlo commented 5 years ago

@crosscompile I check it on Windows. Everything is ok. Thank you!