Skip to content

STRWEB-158 Exclude consumer test files from type checking - #189

Merged
alb3rtino merged 1 commit into
mainfrom
STRWEB-158
May 9, 2026
Merged

STRWEB-158 Exclude consumer test files from type checking#189
alb3rtino merged 1 commit into
mainfrom
STRWEB-158

Conversation

@alb3rtino

Copy link
Copy Markdown
Contributor

https://folio-org.atlassian.net/browse/STRWEB-158

Purpose

webpack/tsconfig.json extends include four levels up (../../../../src/**/*.ts(x)) to cover a consuming project's source tree, but exclude is not extended to the same depth. As a result, consumer test files under src/ (e.g. src/components/Foo/Foo.test.tsx) are pulled into the type-check program created by fork-ts-checker-webpack-plugin. A type-only issue in such a file blocks stripes build, even though the consumer's own tsc may pass. Test files are not part of the production bundle, so including them in the build's type-check program adds little value while creating friction. Excluding them keeps responsibilities cleanly separated between stripes build and the consumer's own tsc --noEmit / yarn test.

Approach

Add ../../../../src/**/*.test.ts and ../../../../src/**/*.test.tsx to the exclude list in webpack/tsconfig.json to match the depth of the existing include patterns.

@alb3rtino
alb3rtino requested a review from a team as a code owner May 8, 2026 17:27
@github-actions

github-actions Bot commented May 8, 2026

Copy link
Copy Markdown

Jest Unit Test Results

0 tests  ±0   0 ✅ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
0 files   ±0   0 ❌ ±0 

Results for commit a40b9dc. ± Comparison against base commit 512a0d2.

@sonarqubecloud

sonarqubecloud Bot commented May 8, 2026

Copy link
Copy Markdown

@alb3rtino
alb3rtino merged commit 6cd00df into main May 9, 2026
16 checks passed
@alb3rtino
alb3rtino deleted the STRWEB-158 branch May 9, 2026 09:15
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