Skip to content

refactor: Include test files in type checking #1022

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

y-hsgw
Copy link
Contributor

@y-hsgw y-hsgw commented Jun 5, 2025

I noticed several type errors in the tests directory, so I updated the config to include them in type-checking.
Let me know what you think!

Checks

Changes

  • Created a separate tsconfig.build.json for build purposes.
    → To type-check both lib and tests, but exclude tests from the build output.
  • Fixed type errors that appeared during type-check.

Context

Copy link

codecov bot commented Jun 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.29%. Comparing base (36facf1) to head (350bcd3).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1022   +/-   ##
=======================================
  Coverage   96.29%   96.29%           
=======================================
  Files          47       47           
  Lines        2534     2535    +1     
  Branches     1043     1043           
=======================================
+ Hits         2440     2441    +1     
  Misses         94       94           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Belco90 Belco90 self-requested a review June 5, 2025 16:02
@Belco90 Belco90 added the chore Changes that affect the build system, CI config or other changes that don't modify src/test files label Jun 5, 2025
Copy link
Member

@Belco90 Belco90 left a comment

Choose a reason for hiding this comment

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

I wondered myself many times if we should enable this, but never had the time to do it. Thanks!

@Belco90 Belco90 merged commit 665577c into testing-library:main Jun 5, 2025
31 checks passed
@y-hsgw y-hsgw deleted the pr/refactor-type-check-include-tests branch June 5, 2025 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Changes that affect the build system, CI config or other changes that don't modify src/test files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants