dnd
ts-jest
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.
dnd
-
How do I unit test my *browser only* typescript project with modules using jest?
Sure, here's the code, specifically the branch refactor-and-tests. And yes, I know the SCSS code is bad. I'll be rewriting it later.
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.
What are some alternatives?
owl - OWL: A web framework for structured, dynamic and maintainable applications
jest - Super-fast alternative for babel-jest or ts-jest without type checking. Please use main repository for issues
esbuild - An extremely fast bundler for the web
tsup - The simplest and fastest way to bundle your TypeScript libraries.
bob-esbuild - Building and Running TypeScript projects efficiently with rollup + esbuild
tsc-esm-fix - Make Typescript projects compatible with esm/mjs requirements
svgr - Transform SVGs into React components 🦁 [Moved to: https://github.com/gregberge/svgr]
SvelteKit - web development, streamlined
svelte-vite-jest-template - Svelte template based on Vite's Svelte template, but includes unit testing setup (Jest and Svelte Testing Library).
svelte-preprocess - A ✨ magical ✨ Svelte preprocessor with sensible defaults and support for: PostCSS, SCSS, Less, Stylus, Coffeescript, TypeScript, Pug and much more.
vite - Next generation frontend tooling. It's fast!
plugins - 🍣 The one-stop shop for official Rollup plugins