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

add watch mode for browser testing #324

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

shamilovtim
Copy link
Member

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

Copy link

codesandbox bot commented Dec 2, 2023

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link
Contributor

github-actions bot commented Dec 2, 2023

TBDocs Report

🛑 Errors: 0
⚠️ Warnings: 7

@web5/api

  • Project entry file: packages/api/src/index.ts
📄 File: ./packages/api/src/record.ts
⚠️ extractor:typedoc:missing-docs: Record.tags (GetSignature) does not have any documentation.

@web5/crypto

  • Project entry file: packages/crypto/src/index.ts

@web5/crypto-aws-kms

  • Project entry file: packages/crypto-aws-kms/src/index.ts
📄 File: ./packages/crypto-aws-kms/src/ecdsa.ts
⚠️ extractor:typedoc:missing-docs: EcdsaAlgorithm (Class) does not have any documentation.
📄 File: ./packages/crypto-aws-kms/src/key-manager.ts
⚠️ extractor:typedoc:missing-docs: AwsKeyManager (Class) does not have any documentation.
📄 File: ./packages/crypto-aws-kms/src/utils.ts
⚠️ extractor:typedoc:missing-docs: getKeySpec (CallSignature) does not have any documentation.
🔀 Misc.
⚠️ extractor:typedoc:invalid-link: Failed to resolve link to "@web5/crypto#Secp256k1.adjustSignatureToLowS | here" in comment for EcdsaAlgorithm.sign. You may have wanted "@web5/crypto!Secp256k1.adjustSignatureToLowS | here"

@web5/dids

  • Project entry file: packages/dids/src/index.ts

@web5/credentials

  • Project entry file: packages/credentials/src/index.ts
📄 File: ./packages/credentials/src/verifiable-credential.ts
⚠️ extractor:typedoc:missing-docs: CredentialSchema.__type.id (Property) does not have any documentation.
⚠️ extractor:typedoc:missing-docs: CredentialSchema.__type.type (Property) does not have any documentation.

TBDocs Report Updated at 2024-04-30T20:29:53Z 02adad3

@shamilovtim shamilovtim self-assigned this Dec 2, 2023
Copy link

codecov bot commented Dec 2, 2023

Codecov Report

Merging #324 (90b1901) into main (ae975ea) will not change coverage.
The diff coverage is n/a.

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           
Components Coverage Δ
api 96.69% <ø> (ø)
common 95.00% <ø> (ø)
credentials 94.32% <ø> (ø)
crypto 100.00% <ø> (ø)
dids 88.75% <ø> (ø)
agent 88.08% <ø> (ø)
identity-agent 56.81% <ø> (ø)
proxy-agent 58.43% <ø> (ø)
user-agent 55.22% <ø> (ø)

@shamilovtim
Copy link
Member Author

relates to #232

@shamilovtim shamilovtim added the testing related to new or existing tests label Dec 3, 2023
Copy link

changeset-bot bot commented Apr 30, 2024

⚠️ No Changeset found

Latest commit: 02adad3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codecov-commenter
Copy link

codecov-commenter commented Apr 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.56%. Comparing base (393d483) to head (02adad3).

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           
Components Coverage Δ
agent 78.83% <ø> (ø)
api 97.91% <ø> (ø)
common 98.68% <ø> (ø)
credentials 95.25% <ø> (ø)
crypto 93.81% <ø> (ø)
dids 97.65% <ø> (ø)
identity-agent 96.70% <ø> (ø)
crypto-aws-kms 100.00% <ø> (ø)
proxy-agent 96.70% <ø> (ø)
user-agent 96.70% <ø> (ø)

Copy link
Member

@thehenrytsai thehenrytsai left a 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.

Copy link
Member

@LiranCohen LiranCohen left a 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing related to new or existing tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants