ts-jest
esbuild
ts-jest | esbuild | |
---|---|---|
20 | 345 | |
6,998 | 38,415 | |
- | - | |
9.6 | 9.0 | |
5 days ago | 7 days ago | |
TypeScript | Go | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
ts-jest
-
Managing Software Project Complexity with Development Containers and Continuous Integration
Argument of type X is not assignable to parameter of type 'never' #2610
-
Effortless API Testing: Node.js Techniques for Next.js Route handlers
First, you can't use jest right out of the box, becuase Jest does not support ECMA script nor Typescript. For that, you need to use another dependency like ts-jest, which is a wrapper of jest itself. And maybe even a Babel preset if I need it to work with Babel.. Let's see what we have to do to get this to work.
-
In-Depth guide for TypeScript Library
use ts-jest and set up Paths Re-Map
-
Having issues with passing a Typed object to a func... TS isn't warning when properties of said arg are the wrong type
Jest's out of the box config for TS doesn't do any type checking. You can integrate https://kulshekhar.github.io/ts-jest/ or you can call ‘tsc’ yourself separately
-
Is using Jest for anything other than React a bad idea?
ts-jest has had some strange performance issues and workarounds in the past, though I haven’t used it very recently so it might have fixed those by now.
-
Test-Driven Infrastructure Development with Pulumi and Jest
Since we're working with TypeScript, we can use ts-jest, which conveniently brings Jest along for the ride:
-
Improve your Testing with Custom Matchers in Jest
I want to save you from manually copying the snippets one by one, so here is a Gist with the complete test file. This can be easily executed with Jest (or ts-jest for TypeScript).
- Testing Mongoose with Ts-Jest
-
A complete guide to full-stack live reload
See the Jest configuration docs to learn more about Jest configuration. ts-jest also has good documentation.
-
Setup Jest to React Typescript Vite project, also SWC (part 1)
Using @swc/jest to compile code to CommonJS is much faster than babel-jest, ts-jest which have long cold starts when executing tests in a large project.
esbuild
-
A Simple Approach to SSR with React 19 and esbuild
Why esbuild? compared to other tools esbuild keeps things minimal, it is very fast(the fastest bundler as of today) and supports typescript and esm by default.
-
Optimizing React Development with Vite🤩.
Instant Hot Module Replacement (HMR): During development, Vite only processes the changed files and updates them in the browser instantly, making it incredibly fast and responsive. Optimized Build Process: Vite uses esbuild under the hood for fast JavaScript transpilation, which is significantly faster than Babel. Production Build with Rollup: For production builds, Vite uses Rollup, a highly efficient bundler that produces optimized code.
-
Streamlining frontend CI/CD pipelines with enhanced observability
We have transitioned to using Esbuild for our project's build process and, experiencing a substantial increase in speed compared to our previous setup with Webpack. The primary bottleneck we faced with Webpack was its long build times. Now, with Esbuild integrated into our development environment, our build times have been dramatically reduced to about five seconds, significantly enhancing the efficiency of our workflow.
-
What is Evan You doing by creating VoidZero, and what are the issues with JS toolchains?
However, new tools such as SWC and esbulid now also support JS code compression, and their execution efficiency is higher. After all, Rust or Go inherently have much higher execution efficiency than JS.
-
Node.js and esbuild: beware of mixing cjs and esm
When executing esbuild bundled code with --platform=node you may have come across one of the following runtime errors:
-
Node.js: A brief history of cjs, bundlers, and esm
npm packages dramatically sped up the productivity of developers by being able to leverage other developers' work. However, it had a major disadvantage: cjs was not compatible with web browsers. To solve this problem, the concept of bundlers was born. browserify was the first bundler which essentially worked by traversing an entry point and "bundling" all the require()-ed code into a single .js file compatible with web browsers. As time went on, other bundlers with additional features and differentiators were introduced. Most notably webpack, parcel, rollup, esbuild and vite (in chronological order).
- ESBuild package gone from NPM registry
-
Make your Vite applications run a little faster
Using a more raw toolchain is also a good way to speed things up; the SWC website shows it to be 20 to 70 times faster than Babel, and there are tons of speed advantages in complex real-world applications, which proves that rawness can be a big help in speeding things up. Instead of vite-plugin-react, you can use @vitejs/plugin-react-swc, with LightningCSS instead of PostCSS, SWC or esbuild instead of Babel, etc. etc. to achieve better performance.
-
Webpack Performance Tuning: Minimizing Build Times for Large Projects
Babel with 49,577,061 npm downloads per week, is the most used tool for JavaScript transformation, we looked at Esbuild as a replacement but many functionalities, most notably loadable support, are missing. Another alternative SWC, written in Rust, supports all the necessary functionalities we need, and on top of that it has APIs similar to Babel, making migration much smoother than other alternatives:
-
Optimising package size for Typescript AWS Lambda functions using serverless-esbuild
Added a plugin to exclude vendor sourcemaps from the scripts (big reduction) exclude node_modules from source map Issue #1685 · evanw/esbuild · GitHub
What are some alternatives?
jest - Super-fast alternative for babel-jest or ts-jest without type checking. Please use main repository for issues
swc - Rust-based platform for the Web
tsup - The simplest and fastest way to bundle your TypeScript libraries.
vite - Next generation frontend tooling. It's fast!
bob-esbuild - Building and Running TypeScript projects efficiently with rollup + esbuild
Rollup - Next-generation ES module bundler
tsc-esm-fix - Make Typescript projects compatible with esm/mjs requirements
webpack - A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.
svgr - Transform SVGs into React components 🦁 [Moved to: https://github.com/gregberge/svgr]
parcel - The zero configuration build tool for the web. 📦🚀
SvelteKit - web development, streamlined
terser - 🗜 JavaScript parser, mangler and compressor toolkit for ES6+