-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Code coverage for bun test
#3975
Merged
Merged
Conversation
This file contains 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
❌ @Jarred-Sumner 1 files with test failures on linux-x64-baseline:
|
❌ @Jarred-Sumner 1 files with test failures on linux-x64:
|
❌ @Jarred-Sumner 2 files with test failures on bun-darwin-aarch64:
|
❌ @Jarred-Sumner 4 files with test failures on bun-darwin-x64-baseline:
|
Jarred-Sumner
force-pushed
the
jarred/code-coverage
branch
from
August 6, 2023 12:37
e8bf5a4
to
c8adf08
Compare
trnxdev
pushed a commit
to trnxdev/bun
that referenced
this pull request
Aug 9, 2023
* WIP code coverage initial commit * almost works * one approach * Code Coverage * Update WebKit * it works but is not yet accurate * skip double ascii check * wrapper * it works but i'm not sure what to do about blocks * hide blocks for now * Update ZigSourceProvider.cpp * Create coverage.md * Update nav.ts --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Closed
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.
What does this PR do?
This is an extremely WIP PR that lets you see what code ran in
bun test
.This adds a new flag
--coverage
tobun test
which enables JavaScriptCore'sJSC::ControlFlowProfiler
which tracks the positions (byte offsets) of code that was executed and how many times.The hard part here is not the code coverage, but is source-mapping from these byte offsets to line numbers in the input source file.
I see a couple approaches to solving this:
How did you verify your code works?
Too manually. We need some integration tests for this.