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 · API reference · all subjects

recordartifact

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

recordArtifact function signature

recordArtifact is a function with signature: function recordArtifact<Artifact extends TestArtifact>(task: Test, artifact: Artifact): Promise<Artifact>. It records an artifact during test execution and returns it, expecting a task as the first parameter and an object assignable to TestArtifact as the second.

recordArtifact experimental API warning

recordArtifact is an experimental API (introduced in Vitest 4.0.11). Breaking changes might not follow SemVer, and users should pin Vitest's version when using it. The API surface may change based on feedback.

recordArtifact timing constraint

Artifacts must be recorded before the task is reported. Any artifacts recorded after the task is reported will not be included in the task.

recordArtifact events emitted

When an artifact is recorded on a test, recordArtifact emits an onTestArtifactRecord runner event and an onTestCaseArtifactRecord reporter event.

coverage.changed limits coverage reporting to modified files

coverage.changed option limits code coverage reporting to only modified files while still running all test files. Unlike the --changed flag which includes unchanged files, --coverage.changed excludes unchanged files from coverage reporting.

coverage ignore start/stop comments for both v8 and istanbul providers

Code coverage can ignore specific lines using comments: /* istanbul ignore start -- @preserve */ ... /* istanbul ignore stop -- @preserve */ for istanbul provider, or /* v8 ignore start -- @preserve */ ... /* v8 ignore stop -- @preserve */ for v8 provider. Both providers now support this feature.

coverage.htmlDir option for custom coverage reporters

The coverage.htmlDir option allows custom coverage reporters to integrate their HTML output. Coverage HTML viewing now works reliably across UI mode, HTML reporter, and browser mode, including when deployed under a subpath.

Give your agent this brain