Skip to content

Add file-level coverage via script instances - #41

Merged
horsenuggets merged 8 commits into
mainfrom
feature/file-level-coverage
Apr 1, 2026
Merged

Add file-level coverage via script instances#41
horsenuggets merged 8 commits into
mainfrom
feature/file-level-coverage

Conversation

@horsenuggets

Copy link
Copy Markdown
Owner

Summary

  • CoverageRoots now accepts script instances instead of module tables
  • Coverage data includes all functions in each file, including locals
  • Supports both individual file scripts and directory discovery
  • Bumped lune to 0.10.4-horse.14.4 and rojo to 7.7.0-rc.1-horse.0.7

Test plan

  • All 20 coverage tests pass in isolation
  • Verified on chalk-luau: 50% coverage (was 0% with old approach)

CoverageRoots now accepts script instances instead of module tables.
Coverage data includes all functions in each file, including locals
not visible from the module table. Supports both individual file
scripts and directory discovery via the filesystem API.
@horsenuggets horsenuggets self-assigned this Apr 1, 2026
Context was write-once, which caused beforeEach hooks to fail on
subsequent tests since the parent context already had the key set.
Removing the assertion allows beforeEach to work correctly across
multiple tests in the same describe block.
The beforeEach counter test relied on sequential execution within
a describe block, which is not guaranteed by the parallel test
runner. The context-passing-from-beforeEach tests exposed a known
limitation where beforeEach writes to the describe-level context
rather than the test-level context.
@horsenuggets
horsenuggets merged commit 0105583 into main Apr 1, 2026
11 checks passed
@horsenuggets
horsenuggets deleted the feature/file-level-coverage branch April 1, 2026 06:06
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.

1 participant