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

Vitest Playwright #996

Merged
merged 8 commits into from
Jun 27, 2024
Merged

Vitest Playwright #996

merged 8 commits into from
Jun 27, 2024

Conversation

HunterBarclay
Copy link
Member

Description

We've been bouncing around the issue of vitest running node, when we have a web app. This PR adds playwright, to run both the development server and a headless browser for running unit tests to avoid issues of node environment compilation.

Motivation

I need to update Jolt Physics and something in the recent releases changed, such that it uses a new URL() call for getting the path to a file. This causes issues because vitest in a jsdom environment transforms new URL() calls to using http:// paths, and if we use the node environment, we lose access to things like the window.

Physics Memory

This should have a new version of the Jolt Physics package that enables memory growth and maybe increases the default size.

@HunterBarclay HunterBarclay added enhancement physics Relating to either the underlying physics engine or the usage of it testing labels Jun 26, 2024
@HunterBarclay HunterBarclay self-assigned this Jun 26, 2024
@HunterBarclay HunterBarclay requested a review from a team as a code owner June 26, 2024 17:14
@HunterBarclay HunterBarclay requested review from a-crowell and Dhruv-0-Arora and removed request for a team June 26, 2024 17:14
@HunterBarclay
Copy link
Member Author

Waiting on #990

Copy link
Collaborator

@a-crowell a-crowell left a comment

Choose a reason for hiding this comment

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

Was this meant to fix #990 vitest memory? I'm still getting the error running Body Loading 2471 that doesn't occur individually.

@HunterBarclay HunterBarclay mentioned this pull request Jun 26, 2024
4 tasks
@HunterBarclay
Copy link
Member Author

Was this meant to fix #990 vitest memory? I'm still getting the error running Body Loading 2471 that doesn't occur individually.

@a-crowell Yes, partly. We can ignore it in #990 for right now.

@HunterBarclay HunterBarclay requested a review from PepperLola June 26, 2024 21:42
@HunterBarclay
Copy link
Member Author

@a-crowell @PepperLola @Dhruv-0-Arora Can you verify that you can run unit tests with no errors? Note an extra setup command that I'm about to add to the readme and package.json:

npx playwright install

This installs the playwright browsers.

@a-crowell a-crowell changed the title Vitest Playwirght Vitest Playwright Jun 26, 2024
Copy link
Collaborator

@a-crowell a-crowell left a comment

Choose a reason for hiding this comment

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

Cleared!

Copy link
Member

@PepperLola PepperLola 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

@HunterBarclay HunterBarclay merged commit 3df3929 into dev Jun 27, 2024
12 checks passed
@HunterBarclay HunterBarclay deleted the barclah/vitest-playwright branch June 27, 2024 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement physics Relating to either the underlying physics engine or the usage of it testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants