new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Vitest · Guide · all subjects

benchmarking

6 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Benchmarking API rewritten for Vitest 5.0

In Vitest 5.0, the benchmarking API has been rewritten. bench is no longer a top-level import from vitest; it is a test-context fixture accessed from inside a regular test(). The syntax changed from bench('sort', () => { ... }) at module scope to test('sort', async ({ bench }) => { await bench('sort', () => { ... }).run() }).

bench.skip, bench.only, bench.todo removed

In Vitest 5.0, bench.skip, bench.only, and bench.todo are removed. Use the regular test.skip, test.only, test.todo on the surrounding test() instead.

benchmark.reporters and benchmark.outputFile removed

In Vitest 5.0, benchmark.reporters and benchmark.outputFile are removed. Benchmark output is now part of the default reporter and the json reporter; configure those at the top level via test.reporters instead.

benchmark.compare config and --compare flag removed

In Vitest 5.0, the benchmark.compare config option and --compare CLI flag are removed. Pass writeResult as a per-bench option to persist a result, and read it back with bench.from() inside bench.compare().

benchmark.outputJson config and --outputJson flag removed

In Vitest 5.0, the benchmark.outputJson config option and --outputJson CLI flag are removed. Use --reporter=json --outputFile=<path> to capture benchmark results; the JSON reporter now includes a benchmarks field on each test case.

Vitest instance mode property no longer uses 'benchmark'

In Vitest 5.0, the Vitest instance mode property is now always 'test'. The previous 'benchmark' value is no longer used; benchmarks run inside a dedicated project of the same Vitest instance.

Give your agent this brain