dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
34.83k stars 9.84k forks source link

React SPA Template Jest Unit Tests Should Work #30388

Open pleandre opened 3 years ago

pleandre commented 3 years ago

React SPA Project Templates / .csproj don't handle Typescript / Javascript unit tests.

Please see: https://github.com/microsoft/nodejstools/issues/2317
Once the change is perform in NodeJSTools, project templates in this repository should be updated.

The project templates should follow these guidelines: Unit testing JavaScript and TypeScript in Visual Studio and make sure it works.

ghost commented 3 years ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

siyandand1 commented 1 week ago

I'm a bit new, but my thinking is to edit the .csproj file in the React SPA templates to include the appropriate npm scripts for running Jest tests. Also, add the necessary devDependencies for Jest, React Testing Library, and other required testing tools. Then ensure that Jest configuration is set up correctly in the package.json or in a separate jest.config.js file. Include configurations for handling TypeScript using ts-jest.