-
Notifications
You must be signed in to change notification settings - Fork 56
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
add watch mode for browser testing #324
base: main
Are you sure you want to change the base?
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
TBDocs Report 🛑 Errors: 0 @web5/api
@web5/crypto
@web5/crypto-aws-kms
@web5/dids
@web5/credentials
TBDocs Report Updated at 2024-04-30T20:29:53Z |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #324 +/- ##
=======================================
Coverage 91.77% 91.77%
=======================================
Files 73 73
Lines 15765 15765
Branches 1448 1448
=======================================
Hits 14469 14469
Misses 1270 1270
Partials 26 26
|
relates to #232 |
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #324 +/- ##
=======================================
Coverage 90.56% 90.56%
=======================================
Files 112 112
Lines 29117 29117
Branches 2085 2085
=======================================
Hits 26370 26370
Misses 2712 2712
Partials 35 35
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty cool and powerful, would love to merge this in.
Though no one would probably know about it thus no one would use it unless it is promoted and documented beyond the PR description here.
I'd suggest to add a section in CONTRIBUTING.md (just copy and paste what you have in PR description, would be even better if video demo is intact too) to promote this as a tool at contributor's disposal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really awesome!
Same comments as @thehenrytsai about maybe just adding a blurb about it to CONTRIBUTING.md
Reason for PR
Watch mode is a convenient way to have live reload for testing but is currently missing from the existing test solutions in the project
Implementation
Use the esbuild API and CLI arguments to integrate web test runner watch with esbuild watch.
Esbuild watch uses incremental compilation for speed. Using esbuild watch only the relevant files should be re-compiled and web test runner watches these files with its native watcher.
Demo
Screen.Recording.2023-12-01.at.4.07.33.PM.mov