Skip to content

asd-xiv/jest-config

Repository files navigation

Release npm version

@asd14/jest-config

Reusable Jest configuration.

Installation

npm install --save-dev @asd14/jest-config

Usage

In your jest.config.js file, add the following:

import baseConfig from "@asd14/jest-config"

/** @satisfies {import("@jest/types").Config.InitialOptions} */
export default /** @type {const} */ ({
  ...baseConfig,
  testEnvironment: "jsdom"
})

What baseConfig does:

  1. Resolve @d41/* and @asd14/* monorepo packages;
  2. Allow importing *.js extension files which are problematic since Jest parses src files and those *.js files might not yet be transpiled.
  3. Enforce 95% coverage threshold :godmode:

About

Reusable Jest configuration.

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •