diff --git a/README.md b/README.md index c9f75e27..3896ed5f 100644 --- a/README.md +++ b/README.md @@ -45,9 +45,9 @@ describe('focused input field', () => { cy.visit('http://todomvc.com/examples/react/') cy .focused() - .snapshot('initial') + .snapshot({ name: 'initial' }) .type('eat healthy breakfast') - .snapshot('after typing') + .snapshot({ name: 'after typing' }) }) }) ``` diff --git a/src/index.js b/src/index.js index 57923d43..3a92ac2f 100644 --- a/src/index.js +++ b/src/index.js @@ -158,7 +158,7 @@ function registerCypressSnapshot () { devToolsLog.expected = expected delete devToolsLog.value devToolsLog.value = value - throw new Error(`Snapshot difference. To update, delete snapshot and rerun test.\n${json.message}`) + throw new Error(`Snapshot "${name}" difference. To update, delete snapshot and rerun test.\n${json.message}`) }) }