Skip to content

Commit

Permalink
Fixing repeat suite logic
Browse files Browse the repository at this point in the history
  • Loading branch information
samkevin1 committed Mar 7, 2023
1 parent 7bc7d52 commit fc2eb15
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/runner/src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,9 @@ export async function runSuite(suite: Suite, runner: VitestRunner) {
suite.result.state = 'todo'
}
else {
let retry = suite.repeats
const retry = suite.mode === 'repeats' ? suite.repeats! : suite.retry || 1

for (let retryCount = 0; retryCount < retry!; retryCount++) {
if (suite.mode !== 'repeats')
retry = 1
for (let retryCount = 0; retryCount < retry; retryCount++) {
try {
beforeAllCleanups = await callSuiteHook(suite, suite, 'beforeAll', runner, [suite])

Expand Down

0 comments on commit fc2eb15

Please sign in to comment.