Conversation
a741ffb to
4ff5878
Compare
jstz_test ext
4ff5878 to
c9bf455
Compare
c9bf455 to
a2c945d
Compare
Codecov Report❌ Patch coverage is
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
|
||
| pub mod jstz_test; | ||
|
|
There was a problem hiding this comment.
| pub mod jstz_test; | |
| pub mod jstz_test; |
Can we remove the empty lines?
There was a problem hiding this comment.
Do these js files have accompanying .d.ts files?
|
Could you also create Linear issues and attach them to Jstz.Test framework for project level tracking? |
| // The runtime must be explicitly dropped to avoid an assert false | ||
| // in `InnerIsolateState::prepare_for_cleanup`. | ||
| drop(runtime); |
There was a problem hiding this comment.
That's odd... Doesn't JstzRuntime automatically drop when it goes out of scope on line 582?
| Plan(TestPlan), | ||
| Wait(usize), | ||
| Output(Vec<u8>), | ||
| Slow(usize, u64), |
| @@ -0,0 +1,606 @@ | |||
| // Copyright 2018-2025 the Deno authors. MIT license. | |||
There was a problem hiding this comment.
Its probably a good idea to document the general ADT architecture either on top of each struct or as an overview here for future maintainers to get a better mental model of the data structure
Context
This PR implements functionality in the Jstz runtime to add support for registering test specifications.
The API is identical to
Deno.test(https://docs.deno.com/runtime/fundamentals/testing/)Description
This PR copies and pastes code directly from https://github.com/denoland/deno/tree/main/cli/tools/test
and https://github.com/denoland/deno/tree/main/cli/js.
When reviewing this PR, one can ignore:
40_test_common.js-- this is a copy of https://github.com/denoland/deno/blob/main/cli/js/40_test_common.js40_test.js-- this is a copy of https://github.com/denoland/deno/blob/main/cli/js/40_test.jsMost of the types and functions in
jstz_test/mod.rsare taken from various files in https://github.com/denoland/deno/tree/main/cli/tools/test.Manually testing the PR
This PR comes with a unit test to check that we correctly register the extension and that test specs are visible in Rust once the main module has been evaluated.
cargo test --package jstz_runtime --lib --features v2_runtime -- ext::jstz_test::tests