Skip to content

tests: add Bun test fixture for bun:test runtime regression coverage#421

Open
Pr1ncePS2002 wants to merge 1 commit intotirth8205:mainfrom
Pr1ncePS2002:regression/bun-test-fixture
Open

tests: add Bun test fixture for bun:test runtime regression coverage#421
Pr1ncePS2002 wants to merge 1 commit intotirth8205:mainfrom
Pr1ncePS2002:regression/bun-test-fixture

Conversation

@Pr1ncePS2002
Copy link
Copy Markdown

No description provided.

Copilot AI review requested due to automatic review settings May 3, 2026 10:24
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_BY edge generation.
  • Introduce a new TypeScript fixture file (sample_bun.test.ts) that imports from bun:test and exercises describe/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 thread tests/test_parser.py
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, (
Comment thread tests/test_parser.py

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")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants