You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`clean` - remove coverage data, Jest cache and transpiled files,
56
+
-`clean` - remove coverage data, cache and transpiled files,
57
57
-`prebuild` - lint source files and tests before building,
58
58
-`build` - transpile TypeScript to ES6,
59
59
-`build:watch` - interactive watch mode to automatically transpile source files,
60
60
-`lint` - lint source files and tests,
61
61
-`prettier` - reformat files,
62
62
-`test` - run tests,
63
63
-`test:watch` - interactive watch mode to automatically re-run tests
64
+
-`test:coverage` - run test and print out test coverage
64
65
65
66
## Additional Information
66
67
67
68
### Why include Volta
68
69
70
+
I recommend to [install][volta-getting-started] Volta and use it to manage your project's toolchain.
71
+
69
72
[Volta][volta]’s toolchain always keeps track of where you are, it makes sure the tools you use always respect the settings of the project you’re working on. This means you don’t have to worry about changing the state of your installed software when switching between projects. For example, it's [used by engineers at LinkedIn][volta-tomdale] to standardize tools and have reproducible development environments.
70
73
71
-
I recommend to [install][volta-getting-started] Volta and use it to manage your project's toolchain.
74
+
### Why Vitest instead of Jest
75
+
76
+
I recommend using [Vitest][vitest] for unit and integration testing of your TypeScript code.
77
+
78
+
In 2023, my team and I gradually switched from Jest to [Vitest][vitest] in all the projects. We've found out that generally, Vitest is faster than Jest, especially for large test suits. Furthermore, Vitest has native support for ES modules, is easier to configure, and has a much nicer developer experience when used with TypeScript. For example, when working with mocks, spies and types.
79
+
80
+
Nevertheless, the choice of specific tooling always depends on the specific requirements and characteristics of the project.
72
81
73
82
### ES Modules
74
83
@@ -97,9 +106,7 @@ Licensed under the APLv2. See the [LICENSE](https://github.com/jsynowiec/node-ty
0 commit comments