Skip to content

Conversation

@hi-ogawa
Copy link
Contributor

@hi-ogawa hi-ogawa commented Mar 15, 2025

This adds (almost) e2e testing of oxc-parser on browser using Vitest browser mode.

How to test locally:

cd napi/parser
pnpm build-wasi
pnpm build-npm-dir
pnpm test-browser  # before this, you'll likely need `pnpm exec playwright install chromium`

I said "almost" because this doesn't test the exact scenario when oxc-parser and @oxc-parser/binding-wasm32-wasi are installed under node_modules, which can cause bundlers to behavior differently (especially Vite unbundled dev). Nonetheless, this should verify functional napi-rs setup for browser. I think we can separately create a sample Vite app on stackblitz for doc purpose, which requires optimizeDeps.exclude and other gotchas.

todo

  • run it on ci
  • test other napi-rs pakcages?

@github-actions github-actions bot added the C-test Category - Testing. Code is missing test cases, or a PR is adding them label Mar 15, 2025
Copy link
Contributor Author

hi-ogawa commented Mar 15, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@hi-ogawa hi-ogawa force-pushed the 03-15-test_napi_parser_test_wasi_browser branch 2 times, most recently from 4cbd262 to acfdb77 Compare March 15, 2025 07:30
@hi-ogawa hi-ogawa marked this pull request as ready for review March 15, 2025 07:36
@hi-ogawa hi-ogawa force-pushed the 03-09-feat_napi_parser_json.parse_the_returned_ast branch from 0d2f001 to db3574b Compare March 15, 2025 09:29
@hi-ogawa hi-ogawa force-pushed the 03-15-test_napi_parser_test_wasi_browser branch 2 times, most recently from a296d7f to a4237d2 Compare March 15, 2025 09:32
@Boshen Boshen requested a review from Brooooooklyn March 15, 2025 13:53
@Boshen Boshen force-pushed the 03-09-feat_napi_parser_json.parse_the_returned_ast branch from db3574b to 5bf345c Compare March 18, 2025 02:04
Base automatically changed from 03-09-feat_napi_parser_json.parse_the_returned_ast to main March 18, 2025 03:31
@Boshen Boshen force-pushed the 03-15-test_napi_parser_test_wasi_browser branch 3 times, most recently from 2d5e342 to a7bf868 Compare March 18, 2025 03:51
@Boshen Boshen force-pushed the 03-15-test_napi_parser_test_wasi_browser branch from a7bf868 to 4990961 Compare March 18, 2025 03:56
@Boshen Boshen merged commit 48bac92 into main Mar 18, 2025
20 checks passed
@Boshen Boshen deleted the 03-15-test_napi_parser_test_wasi_browser branch March 18, 2025 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-test Category - Testing. Code is missing test cases, or a PR is adding them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants