-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
replace ComponentName.cy.ts to ComponentName.cy.tsx in component test #24880
Comments
Hi @DongHY1 , thanks for opening an issue! It sounds like you're proposing that projects that are JSX-friendly include the JSX/TSX extension by default when proposing names for newly-created component spec files, is that correct? I think that would be possible, but we would need to do some brainstorming to ensure we only apply that logic for projects where it makes sense (for example, Angular and Svelte by default don't use JSX). Our "Create Spec from Component" feature is being expanded to support React in an upcoming release, and that will utilize JSX the way you describe plus automatically add the |
I'm looking forward to trying it out when it becomes available. It sounds like it will be a great addition to the tool, and I'm sure it will be very useful for creating specs for React components. |
This work is being tracked under #24773 , closing this issue as a duplicate of the functionality being delivered there |
What would you like?
Replace the default provided
ComponentName.cy.ts
withComponentName.cy.tsx
Why is this needed?
Using Next.js + TypeScript , component test default provided spec
ComponentName.cy.ts
When we import a component, it will report an TS error by default
The solution is to change file
ComponentName.cy.ts
toComponentName.cy.tsx
Other
No response
The text was updated successfully, but these errors were encountered: