tests: add Bun test fixture for bun:test runtime regression coverage#421
Open
Pr1ncePS2002 wants to merge 1 commit intotirth8205:mainfrom
Open
tests: add Bun test fixture for bun:test runtime regression coverage#421Pr1ncePS2002 wants to merge 1 commit intotirth8205:mainfrom
Pr1ncePS2002 wants to merge 1 commit intotirth8205:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds Bun (bun:test) fixtures and parser tests to extend JS/TS test-runner regression coverage in the parser test suite.
Changes:
- Add new parser unit tests to validate Bun test detection and
TESTED_BYedge generation. - Introduce a new TypeScript fixture file (
sample_bun.test.ts) that imports frombun:testand exercisesdescribe/it/test.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/test_parser.py | Adds two new tests asserting Bun test files produce Test nodes and TESTED_BY edges. |
| tests/fixtures/sample_bun.test.ts | Adds a Bun-flavored .test.ts fixture importing from bun:test and calling into existing TS fixture types. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+665
to
+669
| def test_bun_tested_by_edges(self): | ||
| """TESTED_BY edges should be generated from bun tests to production code.""" | ||
| _, edges = self.parser.parse_file(FIXTURES / "sample_bun.test.ts") | ||
| tested_by = [e for e in edges if e.kind == "TESTED_BY"] | ||
| assert len(tested_by) >= 1, ( |
|
|
||
| def test_bun_test_detection(self): | ||
| """A .test.ts file importing from 'bun:test' should produce Test nodes.""" | ||
| nodes, _ = self.parser.parse_file(FIXTURES / "sample_bun.test.ts") |
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.
No description provided.