Skip to content
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.

Commit

Permalink
perf(runner): skipped suite handler should not be called
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Sep 25, 2022
1 parent 7782736 commit e213603
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/peeky-runner/src/runtime/collect-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import type {
} from '../types'
import { toMainThread } from './message.js'

const SKIP_SUITE_HANDLER = ['skip', 'todo'] as const

export function setupTestCollector (ctx: Context): {
exposed: {
describe: DescribeFn
Expand Down Expand Up @@ -86,7 +88,7 @@ export function setupTestCollector (ctx: Context): {
parentSuite.children.push(['suite', suite])
}
currentSuites.push(suite)
if (handler && flag !== 'todo') {
if (handler && !SKIP_SUITE_HANDLER.includes(flag)) {
handler()
}
currentSuites.pop()
Expand Down

0 comments on commit e213603

Please sign in to comment.