From e4b34b81e6f1e5b791eb2d50b479844add7347f0 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Tue, 11 Mar 2025 22:40:31 +0900 Subject: [PATCH] test: test hook cleanup timeout correctly (#7651) --- ...ks-timeout-before-hook-cleanup-callback.test.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/test/cli/fixtures/fails/hooks-timeout-before-hook-cleanup-callback.test.ts b/test/cli/fixtures/fails/hooks-timeout-before-hook-cleanup-callback.test.ts index ccbe5c6e8..df4598010 100644 --- a/test/cli/fixtures/fails/hooks-timeout-before-hook-cleanup-callback.test.ts +++ b/test/cli/fixtures/fails/hooks-timeout-before-hook-cleanup-callback.test.ts @@ -1,11 +1,15 @@ -import { beforeEach, beforeAll, describe, test } from 'vitest'; +import { beforeEach, beforeAll, describe, test, expect } from 'vitest'; describe('beforeEach cleanup timeout', () => { - beforeEach(() => new Promise(() => {}), 101) - test("ok", () => {}) + beforeEach(() => () => new Promise(() => {}), 101) + test("ok", () => { + expect(0).toBe(0) + }) }) describe('beforeAll cleanup timeout', () => { - beforeAll(() => new Promise(() => {}), 102) - test("ok", () => {}) + beforeAll(() => () => new Promise(() => {}), 102) + test("ok", () => { + expect(0).toBe(0) + }) }) -- 2.51.2