Skip to content

The test always succeeds. #1580

Discussion options

You must be logged in to vote

I wrote the following test code, but when I run the test it is successful. How can I make the test fail?

describe("example-describe", () => {
  test("example-test", () => {
    expect(1).toEqual(2);
  });
});

VSCode Outputs:

Test result not found. 
Are there tests with the same name?
Can you run vitest successfully on this file? Does it need custom option to run?

I'm sorry, my settings were wrong.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Vivi-Ornitier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant