Skip to content

Commit

Permalink
test: update
Browse files Browse the repository at this point in the history
  • Loading branch information
fenghan34 committed Feb 8, 2024
1 parent 9c64588 commit c10d27e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/core/test/fixture-options.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@ import { afterAll, beforeEach, describe, expect, test, vi } from 'vitest'
const mockServer = { setup: vi.fn(), teardown: vi.fn() }
const FnA = vi.fn()

const myTest = test.extend({
const myTest = test.extend<{
autoFixture: void
normalFixture: any[]
}>({
autoFixture: [async ({}, use) => {
await mockServer.setup()
await use()
await mockServer.teardown()
}, { auto: true }],

normalFixture: [async ({}, use) => {
normalFixture: [async () => {
await FnA()
await use()
}, {}],
})

Expand Down

0 comments on commit c10d27e

Please sign in to comment.