Skip to content

webcanvas: add test:coverage script with coverage reporting#266

Open
tinyjin wants to merge 1 commit intomainfrom
jinny/unit-test-coverage
Open

webcanvas: add test:coverage script with coverage reporting#266
tinyjin wants to merge 1 commit intomainfrom
jinny/unit-test-coverage

Conversation

@tinyjin
Copy link
Copy Markdown
Member

@tinyjin tinyjin commented Mar 26, 2026

usage:

pnpm --filter @thorvg/webcanvas test:coverage
open packages/webcanvas/coverage/index.html # Open report page
CleanShot 2026-03-26 at 16 51 12@2x CleanShot 2026-03-26 at 16 52 00@2x

related: #264

usage:
```
pnpm --filter @thorvg/webcanvas test:coverage
open packages/webcanvas/coverage/index.html # Open report page
```

related: #264
@tinyjin tinyjin self-assigned this Mar 26, 2026
@tinyjin tinyjin requested a review from hermet as a code owner March 26, 2026 07:50
@tinyjin tinyjin added webcanvas WebCanvas test Unit-Tests labels Mar 26, 2026
Copilot AI review requested due to automatic review settings March 26, 2026 07:50
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 Vitest V8 coverage reporting to @thorvg/webcanvas to support the testing/coverage goals in issue #264 and produce HTML/LCOV outputs for inspection and CI integration later.

Changes:

  • Add test:coverage script to run vitest with coverage enabled.
  • Configure Vitest coverage (V8 provider + text/html/lcov reporters) and output directory.
  • Ignore generated coverage artifacts in the package .gitignore.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
pnpm-lock.yaml Adds @vitest/coverage-v8 and its transitive dependencies to the lockfile.
packages/webcanvas/vitest.config.ts Configures coverage provider/reporters and coverage output directory.
packages/webcanvas/package.json Adds test:coverage script and @vitest/coverage-v8 devDependency.
packages/webcanvas/.gitignore Ignores the generated coverage/ directory.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Copy Markdown

🚀 Playground preview deployment ready!

🎮 Playground: https://thorvg-playground-7o7zkgl14-thorvg-web.vercel.app

@github-actions
Copy link
Copy Markdown

🚀 Perf Test preview deployment ready!

📊 Perf Test: https://thorvg-perf-test-pazbnkrez-thorvg-web.vercel.app

@tinyjin
Copy link
Copy Markdown
Member Author

tinyjin commented Mar 26, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Unit-Tests webcanvas WebCanvas

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants