Skip to content

refactor: Include test files in type checking#1022

Merged
Belco90 merged 3 commits into
testing-library:mainfrom
y-hsgw:pr/refactor-type-check-include-tests
Jun 5, 2025
Merged

refactor: Include test files in type checking#1022
Belco90 merged 3 commits into
testing-library:mainfrom
y-hsgw:pr/refactor-type-check-include-tests

Conversation

@y-hsgw

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

Copy link
Copy Markdown
Member

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

@codecov

codecov Bot commented Jun 5, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.29%. Comparing base (36facf1) to head (350bcd3).
Report is 2 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

@Belco90 Belco90 left a comment

Copy link
Copy Markdown
Member

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
@github-actions

github-actions Bot commented Jun 9, 2025

Copy link
Copy Markdown

🎉 This PR is included in version 7.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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 released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants