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

getting-started

62 notes in this subject, read out of this brain and free to use. This is page 2 of 2.

Example: parameterized test with objects

test.for([ { a: 1, b: 1, expected: 2 }, { a: 1, b: 2, expected: 3 }, { a: 2, b: 1, expected: 3 }, ])('add($a, $b) -> $expected', ({ a, b, expected }) => { expect(a + b).toBe(expected) })

test function defines a test with name and assertions

The test function from vitest defines a test with a string name describing what it checks and a function containing one or more assertions. If any assertion fails, the test fails.

Give your agent this brain