Skip to content

Commit

Permalink
fix: Retry behavior (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
alhan-garcia authored Jun 20, 2023
1 parent 5fc8b47 commit b27f968
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,18 @@ const matchImageSnapshot =
commandOptions,
)

const elementToScreenshot = cy.wrap(subject)
cy.task(MATCH, {
...options,
currentTestTitle: Cypress.currentTest.title,
})

const screenshotName = getScreenshotFilename(filename)

function recursiveSnapshot():
| Cypress.Chainable<DiffSnapshotResult>
// eslint-disable-next-line @typescript-eslint/no-explicit-any
| Cypress.Chainable<DiffSnapshotResult | Cypress.Chainable<any>> {
const elementToScreenshot = cy.wrap(subject)
cy.task(MATCH, {
...options,
currentTestTitle: Cypress.currentTest.title,
})

const screenshotName = getScreenshotFilename(filename)

const currentTime = Date.now()
const hasTimedOut = currentTime - startTime >= Math.abs(options.timeout)

Expand Down

0 comments on commit b27f968

Please sign in to comment.