vitest/test/reporters/fixtures/function-as-name.bench.ts
2024-04-12 10:21:58 +02:00

16 lines
248 B
TypeScript

import { bench } from 'vitest'
const options = {
time: 0,
iterations: 3,
warmupTime: 0,
warmupIterations: 0,
}
function foo() {}
class Bar {}
bench(foo, () => {}, options)
bench(Bar, () => {}, options)
bench(() => {}, () => {}, options)