Closed
Conversation
- Add incremental, isolatedModules, DOM lib to tsconfig.json - Increase memory for typecheck script (8GB) - Fix selectLivePreviewZoom.ts import path - Fix preferences.ts SDK import paths - Remove duplicate openDocDrawer from helpers.ts - Add db adapter peer dependencies for types
- Replace external db adapter type imports with inline types - Filter typecheck output to only show src/ errors - Remove workspace db adapter devDependencies
Test utilities don't need strict type checking - IDE provides real-time feedback and tests catch runtime issues.
Member
Author
|
Diverged too far from main to resolve conflicts cleanly, will create new branch. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Introduces
@tools/test-utils, a shared test utilities package undertools/test-utils/that consolidates test helpers for reuse across the core repo and external repos via git submodule + pnpmworkspace:*protocol.Key Changes
New package
@tools/test-utilsattools/test-utils//int,/e2e,/shared,/database,/setup/vitest,/setup/playwrightMigrated test utilities from
test/helpers/Backwards-compatible re-exports
test/helpers/files now re-export from@tools/test-utilsDesign Decisions
Source exports over build: The package exports
.tsfiles directly rather than compiled output. This simplifies the workflow since test utilities don't need publishing - consumers useworkspace:*protocol which resolves to source.Peer dependencies for flexibility: Database adapters, Playwright, Vitest, etc. are peer dependencies. This allows the package to work with whatever versions the consuming repo uses.
Informational typecheck: TypeScript typecheck filters to only show
src/errors (ignoring workspace package noise) and usesstrict: falsesince this is test utility code. IDE provides real-time feedback; tests catch runtime issues.Overall Flow
flowchart TD A["test/helpers/"] -->|re-exports| B["tools/test-utils"] C["test/*.spec.ts"] -->|imports| A D["External Repos"] -->|git submodule| B E["External repo tests"] -->|imports| B subgraph pkg ["tools/test-utils package"] B1["/int"] B2["/e2e"] B3["/shared"] B4["/database"] end B --> B1 B --> B2 B --> B3 B --> B4