Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

base vitest setup #320

Merged
merged 10 commits into from
Jun 11, 2023
Merged

base vitest setup #320

merged 10 commits into from
Jun 11, 2023

Conversation

jeetiss
Copy link
Collaborator

@jeetiss jeetiss commented May 31, 2023

  • setup vitest
  • move tests to typescript
  • add a lot of // @ts-expect-error comments

Copy link
Owner

@molefrog molefrog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Could you pls check why route parameters are not inferred?

it("supports history.back() navigation", () => {
jest.useFakeTimers();
// Vitest doesn't support Jest's legacy timers.
it.skip("supports history.back() navigation", () => {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t even remember why I had to use fake timers here. Does the test pass when you remove these calls?

Copy link
Collaborator Author

@jeetiss jeetiss Jun 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I replaced FakeTimers with waitFor util from testing-library and test works

@molefrog
Copy link
Owner

Nice, thank you!

@molefrog molefrog merged commit db9a87a into molefrog:v3 Jun 11, 2023
2 checks passed
@jeetiss jeetiss deleted the vitest branch June 11, 2023 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants