diff --git a/vitest.config.ts b/vitest.config.ts index 293d87985..10581cf43 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -15,7 +15,7 @@ const slowTestReporter: Reporter = { onTestRunEnd(testModules, unhandledErrors, reason) { const tests = testModules .flatMap((m) => Array.from(m.children.allTests())) - .filter((test) => test.diagnostic().slow); + .filter((test) => test.diagnostic()?.slow); tests.sort((x, y) => x.diagnostic()?.duration! - y.diagnostic()?.duration!); tests.reverse();