Skip to content

Add JavaScript test coverage with V8 provider and function threshold#214

Open
elevatebart wants to merge 2 commits intomainfrom
claude/add-js-coverage-gjuV1
Open

Add JavaScript test coverage with V8 provider and function threshold#214
elevatebart wants to merge 2 commits intomainfrom
claude/add-js-coverage-gjuV1

Conversation

@elevatebart
Copy link
Copy Markdown
Contributor

  • Add sourcemap: true to tsdown config so dist files map back to source,
    enabling V8 coverage to attribute execution data to original source files
  • Add @vitest/coverage-v8 dependency to test package
  • Add vitest.config.js with coverage targeting javascript-sdk/src/api/**,
    reporting in text/html/json/lcov formats, and a 100% function threshold
    to enforce that every API endpoint function is called at least once
  • Add test:coverage scripts to both package.json files

Run coverage with: npm run test:coverage (from javascript/ directory)

https://claude.ai/code/session_019pdi9Bfy8Q9h4FddD9MBq2

claude added 2 commits April 24, 2026 20:36
- Add sourcemap: true to tsdown config so dist files map back to source,
  enabling V8 coverage to attribute execution data to original source files
- Add @vitest/coverage-v8 dependency to test package
- Add vitest.config.js with coverage targeting javascript-sdk/src/api/**,
  reporting in text/html/json/lcov formats, and a 100% function threshold
  to enforce that every API endpoint function is called at least once
- Add test:coverage scripts to both package.json files

Run coverage with: npm run test:coverage (from javascript/ directory)

https://claude.ai/code/session_019pdi9Bfy8Q9h4FddD9MBq2
…conflicts

Replaces vitest.config.js with vitest.config.ts, matching the style and
structure of the 2.0 SDK branch (double quotes, 4-space indent,
environment: "node"). Adds "**/*.spec.js" alongside "**/*.spec.ts" so
existing tests still run before the 2.0 migration is merged.

https://claude.ai/code/session_019pdi9Bfy8Q9h4FddD9MBq2
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