Files
vitest/test/e2e/fixtures/reporters/function-as-name.bench.ts

22 lines
318 B
TypeScript

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