mirror of
https://github.com/vitest-dev/vitest.git
synced 2025-12-08 18:26:03 +00:00
15 lines
247 B
TypeScript
15 lines
247 B
TypeScript
import { expect, test } from 'vitest'
|
|
|
|
const myTest = test.extend<{ a: number; b: number }>({
|
|
a: async ({ b }, use) => {
|
|
await use(b)
|
|
},
|
|
b: async ({ a }, use) => {
|
|
await use(a)
|
|
},
|
|
})
|
|
|
|
myTest('', ({ a }) => {
|
|
expect(a).toBe(0)
|
|
})
|