Skip to content

fix #464 - bug: Test files are not covered by TypeScript typechecking - #468

Merged
lornakelly merged 2 commits into
open-workflow-specification:mainfrom
fantonangeli:issue-464-bug-Test-files-are-not-covered-by-TypeScript-typechecking
Oct 5, 2026
Merged

lornakelly merged 2 commits into
open-workflow-specification:mainfrom
fantonangeli:issue-464-bug-Test-files-are-not-covered-by-TypeScript-typechecking

Conversation

@fantonangeli

@fantonangeli fantonangeli commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Closes #464

Describe the Bug

During the review of #463, we discovered typeScript errors in test files are not detected by our current package checks or CI.

Further investigation revealed that:

  • tsconfig.json only includes src/**/*.
  • The existing tsconfig.test.json is not executed by any script in package.json.
  • tsconfig.test.json inherits rootDir: "./src", which causes TS6059 errors when checking files under tests/.
  • Similar configurations exist in other monorepo packages and should be reviewed.

Using a temporary test-specific TypeScript configuration, I found 135 TypeScript errors in the Diagram Editor package.

How to test:

pnpm build:prod
# or this for a more readable version
pnpm  --workspace-concurrency=1 build:prod

…ing and fix the TypeScript errors it exposes.

Signed-off-by: Fabrizio Antonangeli <fabrizio.antonangeli@gmail.com>
Signed-off-by: Fabrizio Antonangeli <fabrizio.antonangeli@gmail.com>
Copilot AI balanced review requested due to automatic review settings October 5, 2026 13:00
@changeset-bot

changeset-bot Bot commented Oct 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 24741f8

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify

netlify Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for openworkflow-editor ready!

Name Link
🔨 Latest commit 24741f8
🔍 Latest deploy log https://app.netlify.com/projects/openworkflow-editor/deploys/6ac39f6b293c940008de4302
😎 Deploy Preview https://deploy-preview-468--openworkflow-editor.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

Test configurations are consistently wired into workspace builds, and the exposed typing errors are addressed without changing production behavior.

Review effort: Balanced
Findings: None

What changed in this PR

Adds test-file type-checking across TypeScript workspaces and fixes errors exposed by stricter checks.

Changes:

  • Adds test-specific TypeScript configurations and build scripts.
  • Fixes test typings, Volar API usage, and Storybook helper inference.
  • Adds release changeset entries for affected packages.
File Description
.changeset/​typecheck-test-files.md Records package patch changes.
packages/​text-editor/​tsconfig.test.json Covers unit and E2E tests.
packages/​text-editor/​package.json Runs test type-checking during builds.
packages/​text-editor/​tests/​text-editor/​TextEditor.test.tsx Narrows mocked call access.
packages/​text-editor/​stories/​helpers.ts Improves story argument typing.
packages/​open-workflow-diagram-editor/​tsconfig.test.json Covers unit and E2E tests.
packages/​open-workflow-diagram-editor/​package.json Runs test type-checking during builds.
packages/​open-workflow-diagram-editor/​tests/​react-flow/​diagram/​diagramBuilder.test.ts Narrows task-reference typing.
packages/​open-workflow-diagram-editor/​tests/​react-flow/​diagram/​Diagram.test.tsx Narrows mocked call access.
packages/​open-workflow-diagram-editor/​tests/​react-flow/​diagram/​autoLayout.integration.test.ts Narrows indexed test results.
packages/​open-workflow-diagram-editor/​tests/​diagram-editor/​DiagramEditor.test.tsx Uses the complete ref contract.
packages/​open-workflow-diagram-editor/​tests/​core/​workflowSdk.integration.test.ts Narrows indexed errors.
packages/​open-workflow-diagram-editor/​stories/​helpers.ts Preserves precise story inference.
packages/​language-service/​tsconfig.test.json Adds test type-checking configuration.
packages/​language-service/​package.json Integrates type-checking into builds.
packages/​language-service/​tests/​volar/​json/​code-lenses.test.ts Updates tests for async Volar APIs.
packages/​language-service/​tests/​testUtils.ts Updates shared Volar test fixtures.
packages/​i18n/​tsconfig.test.json Adds test type-checking configuration.
packages/​i18n/​package.json Integrates type-checking into builds.
examples/​vanilla-web-component/​tsconfig.test.json Covers example unit and E2E tests.
examples/​vanilla-web-component/​package.json Integrates test type-checking into builds.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@lornakelly lornakelly left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@handreyrc handreyrc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@lornakelly
lornakelly merged commit cab3e89 into open-workflow-specification:main Oct 5, 2026
13 checks passed
@fantonangeli
fantonangeli deleted the issue-464-bug-Test-files-are-not-covered-by-TypeScript-typechecking branch October 5, 2026 15:58
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.

bug: Test files are not covered by TypeScript typechecking

4 participants