Clear and concise description of the problem
When running a failing test from the VS Code extension, the error logged in the Test Results panel do not contain enough properties of the error objects (e.g. the cause property is missing).
In many cases, it makes it impossible to conduct proper troubleshooting from the test output and requires re-running the test through the Vitest CLI.
import { it } from "vitest";
it("throws an error with cause", () => {
throw new Error("Outer", {
cause: new AggregateError(
[new Error("Inner 1"), new Error("Inner 2")],
"Middle"
),
});
});
The output will be:
Which is clearly not usable.
Suggested solution
Align the error serialization of the VS Code extension closer to that of the Vitest CLI. At the minimum add support for cause. AggregateError already seems to be working.
Alternative
No response
Additional context
No response
Validations
Clear and concise description of the problem
When running a failing test from the VS Code extension, the error logged in the
Test Resultspanel do not contain enough properties of the error objects (e.g. thecauseproperty is missing).In many cases, it makes it impossible to conduct proper troubleshooting from the test output and requires re-running the test through the Vitest CLI.
The output will be:
Which is clearly not usable.
Suggested solution
Align the error serialization of the VS Code extension closer to that of the Vitest CLI. At the minimum add support for
cause.AggregateErroralready seems to be working.Alternative
No response
Additional context
No response
Validations