Skip to content

Evaluations fails on vitest 4.1.0 #286

@hugo082

Description

@hugo082

Evaluation fails because vitest expect destructured first argument on hooks.

FAIL   axiom:eval  myFile.eval.ts > eval-name
FixtureParseError: The 1st argument inside a fixture must use object destructuring pattern, e.g. ({ task } => {}). Instead, received "suite". If you used internal "suite" task as the 1st argument previously, access it in the 2nd argument instead.

It seems to be related to beforeAll and afterAll hooks on eval:

beforeAll(async (suite) => {
// Ensure worker process knows CLI overrides
if (injectedOverrides && Object.keys(injectedOverrides).length > 0) {

afterAll(async (suite) => {
if (instrumentationError) {
throw instrumentationError;

Upgrading to something like: afterAll(async ({}, suite) => { seems to fix the issue on my side

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions