ts-jest
svelte-vite-jest-template
Our great sponsors
ts-jest | svelte-vite-jest-template | |
---|---|---|
18 | 1 | |
6,828 | 5 | |
- | - | |
8.0 | 0.0 | |
6 days ago | over 2 years ago | |
TypeScript | Svelte | |
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
-
In-Depth guide for TypeScript Library
use ts-jest and set up Paths Re-Map
-
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.
-
Component Testing in Svelte
ts-jest: A transformer for handling TypeScript files.
-
The Ultimate Guide to TypeScript Monorepos
Thankfully using TypeScript and TypeScript project references makes the intricate problem of using Jest easier since we can make use of the excellent ts-jest Jest transformer. All we need to do it point ts-jest to the respective tsconfig.json file for each package (see example jest.config.js). Since we have configured TypeScript to be composite and incremental, we do not need to recompile TypeScript for dependencies of a package we want to test, which significantly reduces the runtime for unit tests. ts-jest will also ensure that any error message will reference the line numbers in the source TypeScript files.
-
Testing Svelte components with Jest and Vite
We need to configure Jest to transform our files. We must explicitly set our test environment to jsdom, which we are using through Jest. Since v27 Jest's default test environment is node. I will put the configuration in a specific Jest configuration file called jest.config.json in the project root folder. If you create a configuration file called jest.config.js, Vite will complain as it expects only ESM JavaScript by default. Vite will recommend that you rename it to a ".cjs" file if you want to do it that way. You can look at the different ways to configure Jest if you are unsure about the file conventions. If you're using TypeScript, you need to configure svelte-preprocess and ts-jest also, see the svelte-jester docs for how to do that.
svelte-vite-jest-template
What are some alternatives?
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
svelte-preprocess - A ✨ magical ✨ Svelte preprocessor with sensible defaults and support for: PostCSS, SCSS, Less, Stylus, Coffeescript, TypeScript, Pug and much more.
svgr - Transform SVGs into React components 🦁 [Moved to: https://github.com/gregberge/svgr]
SvelteKit - web development, streamlined
vite - Next generation frontend tooling. It's fast!
parcel - The zero configuration build tool for the web. 📦🚀
plugins - 🍣 The one-stop shop for official Rollup plugins