Skip to content

test: map coverage to src via source maps - #16

Merged
dzmitry-duboyski merged 1 commit into
mainfrom
test/coverage-config
Nov 11, 2026
Merged

dzmitry-duboyski merged 1 commit into
mainfrom
test/coverage-config

Conversation

@dzmitry-duboyski

Copy link
Copy Markdown
Contributor

Map coverage to src/*.ts via source maps. The published npm package is unchanged.

  • build:test builds with --sourcemap and is used by the test scripts, so coverage (and Coveralls) shows src/*.ts instead of hashed dist/chunk-*.js files
  • prepublishOnly and the publish workflow rebuild without source maps before packing, so no .map files are published
  • Docs: fixed jest.config.js comment and tests/README.md (coverage counts the ESM build only; the CJS build is covered by smoke tests), refreshed the coverage table

Note: file names in Coveralls change once, so history for the old dist/ files will not carry over.

- Add build:test (build with --sourcemap) and use it in test scripts,
  so coverage is reported per src/*.ts instead of hashed dist chunks
- Rebuild without source maps in prepublishOnly and before
  npm pack --dry-run in the publish workflow, so the npm package
  is unchanged
- Fix jest.config.js comment and tests/README.md: coverage covers the
  ESM build only, the CJS build is not instrumented by Jest
- Refresh the coverage table in tests/README.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dzmitry-duboyski
dzmitry-duboyski merged commit a1ad1ee into main Nov 11, 2026
6 checks passed
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