feat(runtime): add support for executing test specs#1389
Open
johnyob wants to merge 1 commit intoajob410@jstz-test-extfrom
Open
feat(runtime): add support for executing test specs#1389johnyob wants to merge 1 commit intoajob410@jstz-test-extfrom
johnyob wants to merge 1 commit intoajob410@jstz-test-extfrom
Conversation
c9bf455 to
a2c945d
Compare
58ecac8 to
20a5497
Compare
Codecov Report❌ Patch coverage is
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
zcabter
approved these changes
Dec 2, 2025
zcabter
reviewed
Dec 2, 2025
| .borrow_mut::<TestContainer>(), | ||
| ); | ||
|
|
||
| println!("Descriptions: {:?}", container.descriptions); |
zcabter
reviewed
Dec 2, 2025
| } | ||
| } | ||
|
|
||
| pub async fn test_specifier( |
Collaborator
There was a problem hiding this comment.
Doc comment overview of how this works would be helpful for future maintainers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
This PR adds support for executing test specifications. The test executor runs the tests and associated lifecycle hooks.
Description
Dependencies: #1378
All logic for this PR is in
jstz_test/executor.rs, the bulk of it being intest_specifier.TestEventTrackeris taken from https://github.com/denoland/deno/blob/82eba477fbea8a11127bf2a678413be24e0857a0/cli/tools/test/mod.rs#L1871test_specifieris the function responsible for executing all tests in a given module specifier. The execution plan is as follows:beforeAllhooks (in FIFO order)3. Execute all
beforeEachhooks (FIFO order)4. Execute test
5. Execute all
afterEachhooks (LIFO order)afterAllhooks (LIFO order)Manually testing the PR
cargo test --package jstz_runtime --lib --features v2_runtime -- ext::jstz_test::executor