web5-js icon indicating copy to clipboard operation
web5-js copied to clipboard

add watch mode for browser testing

Open shamilovtim opened this issue 2 years ago • 6 comments

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

https://github.com/TBD54566975/web5-js/assets/3495974/7146c266-8547-4cec-a378-6bd75eccf2b9

shamilovtim avatar Dec 02 '23 00:12 shamilovtim

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders
Open Preview

codesandbox[bot] avatar Dec 02 '23 00:12 codesandbox[bot]

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

github-actions[bot] avatar Dec 02 '23 00:12 github-actions[bot]

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% <ø> (ø)

codecov[bot] avatar Dec 02 '23 00:12 codecov[bot]

relates to #232

shamilovtim avatar Dec 02 '23 00:12 shamilovtim

⚠️ No Changeset found

Latest commit: 02adad3534b9d413ad84960ad7f88e6c7a6642cb

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

changeset-bot[bot] avatar Apr 30 '24 20:04 changeset-bot[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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% <ø> (ø)

codecov-commenter avatar Apr 30 '24 20:04 codecov-commenter