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

chore(vitest): add vitest 2 browser beta test #715

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

userquin
Copy link
Member

@userquin userquin commented Jun 2, 2024

This is just a test using Vitest beta v2.0 packages to run the new added test in the browser: src/components/TresCanvas.test.ts cloned from my previous branch (https://github.com/Tresjs/tres/blob/userquin/feat-vitest-browser/src/components/TresCanvas.test.ts).

To run the browser test:

  • pnpm install && pnpm build from root folder
  • pnpm test:browser:none from root

We can also use webdriverio or playwright, you need to add the corresponding dependencies as dev dependencies and run:

  • pnpm test:browser:webdriverio from root or
  • pnpm test:browser:playwright from root

This PR using vitest packages from local tgz from this PR: vitest-dev/vitest#5815

✔️ DONE: Once we released a new beta version we can use vitest from npm registry.

For CI, we need to include webdriverio or playwright and configure headless to true.

Copy link

netlify bot commented Jun 2, 2024

Deploy Preview for tresjs-docs ready!

Name Link
🔨 Latest commit a6d7fe7
🔍 Latest deploy log https://app.netlify.com/sites/tresjs-docs/deploys/665e335f6f19cc0008e33f65
😎 Deploy Preview https://deploy-preview-715--tresjs-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@userquin
Copy link
Member Author

userquin commented Jun 2, 2024

Once the browser finish running the tests, run the TresCanvas test to see the UI:

imagen

@andretchen0
Copy link
Contributor

e2e tests would be a big help. Looking forward to this.

@userquin
Copy link
Member Author

userquin commented Jun 2, 2024

@andretchen0 we need to cover e2e tests, we have some internal team discussion about it, stay tuned

@userquin
Copy link
Member Author

userquin commented Jun 2, 2024

Here a repository with advanced manual and on demand examples in the playground: https://github.com/userquin/tresjs-vitest-browser-tests

Can also run in StackBlitz, link in the readme file.

@userquin userquin changed the title chore(vitest): add vitest browser beta 2 test chore(vitest): add vitest 2 browser beta test Jun 3, 2024
@garrlker garrlker self-requested a review June 3, 2024 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants