Skip to content

The test name can differ in the base reporter in the task errors #8018

@lafeuil

Description

@lafeuil

Clear and concise description of the problem

I would like to display some information in the report with the test metadata. Therefore, when overloading the default reporter to rename the test by overriding the getTestName function in the BaseReporter class, I can easily add some metadata in the console.

But the getTestName function is not used in the printTaskErrors function. So, the metadata information are not displayed in the errors summary. The getFullname function from the @vitest/runner/utils module.

Suggested solution

Use the getTestName function in the BaseReporter class in the printTaskErrors function.

Or, create a new getFullName function in the BaseReporter class to use it in the printTaskErrors function.

Alternative

No response

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    p1-choreDoesn't change code behavior (priority)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions