Skip to content

Commit

Permalink
fix: Store errors in object when adding new snap (#20)
Browse files Browse the repository at this point in the history
* fix problem when adding a new snapshot (store them in object to log them after the test is finished)
  • Loading branch information
alhan-garcia authored Jul 11, 2023
1 parent 99c352f commit 44fc5f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ const matchImageSnapshot =
const message = `New snapshot: '${screenshotName}' was added`
Cypress.log({name: COMMAND_NAME, message})
//An after each hook should check if @matchImageSnapshot is defined, if yes it should fail the tests
cy.wrap(`A new reference Image was created for ${screenshotName}`, {
log: false,
}).as('matchImageSnapshot')
errorMessages[
screenshotName
] = `A new reference Image was created for ${screenshotName}`
return
}

Expand Down

0 comments on commit 44fc5f5

Please sign in to comment.