Skip to content

Conversation

@jembezmamy
Copy link
Collaborator

This MR introduces beforeRetry hook in the setup function:

const setup = require('qunit-retry');

const retry = setup(QUnit.test, { beforeRetry: () => resetEnvironment() });

It allows performing custom reset logic (e.g. recreating Sinon sanbox) between retries.

⚠️ This MR changes the setup function signature which currently expects maxRuns as a second argument. This MR uses an options object instead. This change was not published on NPM yet, so I think there is no risk in introducing this breaking change.

@mrloop mrloop added enhancement New feature or request breaking and removed breaking labels Nov 11, 2024
@jembezmamy jembezmamy merged commit 1273fcb into master Nov 11, 2024
@jembezmamy jembezmamy deleted the before-retry-hook branch November 11, 2024 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants