Skip to content

Add integration tests for ESM build (typescript/react/vuejs) #7969

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

Open
wants to merge 1 commit into
base: dev-2.0
Choose a base branch
from

Conversation

pratham-radadiya
Copy link

@pratham-radadiya pratham-radadiya commented Jul 13, 2025

Add integration test

resolves #7938

Changes:

Introduced integration test setup for TypeScript, React, and Vuejs using ESM build

TypeScript tests validate declaration accuracy using tsc --noEmit

React tests check usage in a TSX component with hooks and class-based sketches

Vue tests use vue-tsc to verify type compatibility in .vue files

@ksen0
Copy link
Member

ksen0 commented Jul 18, 2025

Hi @pratham-radadiya thanks for working on this! I see you've marked a review comment resolved, do you plan to implement that suggestion in a future commit? In terms of scope: it looks like the top-level package and package-lock files were touched, could you confirm why this was necessary please?

Also tagging the other DevOps stewards on this one @Vaivaswat2244 @error-four-o-four @limzykenneth

@limzykenneth
Copy link
Member

limzykenneth commented Jul 18, 2025

I personally don't quite like the setup here introducing individual standalone project which adds a lot of complexity and the exec stuff can be very brittle as well.

I don't think there is a specific need to test React and Vue, the main thing from the original issue is looking at is around type correctness, React and Vue don't necessarily introduces different ways of working with types here. The original issue mention Vitest's type testing I think is a better direction. I would like our tests to remain within Vitest's ecosystem as much as possible so we don't build out toolings that are somewhat brittle and over time didn't get maintained and used, which is a problem we had with the 1.x devops setup.

@pratham-radadiya
Copy link
Author

Hi @ksen0 and @limzykenneth, thank you both for the detailed feedback!

On the package.json and package-lock.json changes:
These changes were required to include dependencies like vue-tsc, react, and typescript for the integration tests to run correctly in each ESM project. However, I understand now that this introduces unnecessary complexity at the top level. I’ll move these dependencies into local package.json files inside the test subfolders instead, or clean them up if we decide to drop Vue/React tests.

On the scope of React/Vue testing:
You're right — the original issue (#7938) was focused on verifying type correctness, and I see now that React/Vue may not bring extra value here. I can remove the React and Vue test setups and instead focus on tsc + Vitest’s type-only testing approach as suggested. That would keep things consistent with the existing testing strategy and avoid brittle tooling.

I'll push an updated commit shortly reflecting these changes. Please let me know if you'd like me to go in a slightly different direction — happy to adjust!

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.

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy