jaredpalmer / cypress-image-snapshot

Catch visual regressions in Cypress
MIT License
887 stars 160 forks source link

Feature: Custom СachePath #173

Open Xambey opened 3 years ago

Xambey commented 3 years ago

Cache path has static path: root/cypress/.snapshot-report but i've: root/e2e/cypress/...

Previously there was the issue where the path was changed relative to the project root.

I suggest adding customCachePath to the list of options to solve this problem:

line: https://github.com/jaredpalmer/cypress-image-snapshot/blob/0510252bc5f192c410bcca45b511f07737bce4a2/src/plugin.js#L21

export const cachePath = path.join( pkgDir.sync(process.cwd()), 'cypress', '.snapshot-report' );