Skip to content

[Unit Testing] Why not use vitest instead of jest #25217

@ampmonteiro

Description

@ampmonteiro

Which @angular/* package(s) are relevant/related to the feature request?

upgrade

Description

i read in blog post about two tings:

  • Better unit testing with Jest and Web Test Runner
  • Developer preview of the esbuild-based build system, with vite

so my question is: why not use a tool which has better integration with vite as well as better performance ?

Proposed solution

Replace jest by using vitest, which is:

  • compatible with jest API
  • better performance
  • the best fit when using vite

Alternatives considered

allow the devs choose which want to by make available Jest and vitest.

Where those which:

  • dont use vite build base, it is recommend use Jest

  • Otherwise vite + vitest, would be the best bet.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions