1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/packages/infrastructure/jest
Janne Savolainen 0563e57620
Add custom jest resolver to fix requiring "uuid" module
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2023-03-13 08:51:28 +02:00
..
bin Add package for sharing jest configuration for upcoming Features (#7198) 2023-02-22 11:19:16 +02:00
index.js Add package for sharing jest configuration for upcoming Features (#7198) 2023-02-22 11:19:16 +02:00
jest-28-resolver.js Add custom jest resolver to fix requiring "uuid" module 2023-03-13 08:51:28 +02:00
monorepo-package-config.js Add custom jest resolver to fix requiring "uuid" module 2023-03-13 08:51:28 +02:00
monorepo-root-config.js Add package for sharing jest configuration for upcoming Features (#7198) 2023-02-22 11:19:16 +02:00
package.json Bump jest-environment-jsdom from 29.4.3 to 29.5.0 (#7294) 2023-03-07 11:51:58 -05:00
README.md Add package for sharing jest configuration for upcoming Features (#7198) 2023-02-22 11:19:16 +02:00
setup-react-tests.ts Add package for sharing jest configuration for upcoming Features (#7198) 2023-02-22 11:19:16 +02:00

@k8slens/jest

This package contains jest configurations and scripts for Lens packages.

Install

$ npm install @k8slens/jest

Features

Package configurations

Shared configurations for minimal duplication.

Node

./packages//jest.config.js

module.exports = require("@k8slens/jest").monorepoPackageConfig(__dirname).configForNode;

React

./packages//jest.config.js

module.exports = require("@k8slens/jest").monorepoPackageConfig(__dirname).configForReact;

Root configuration

You may want to enable testing of packages using single command from root level. This allows you to utilize jest --watch between all packages.

./jest.config.js

module.exports = require("@k8slens/jest").monorepoRootConfig(__dirname);

Scripts

lens-test

Test package with coverage enforcement. Automatically opens coverage report in case of failure.

./packages//package.json

{
 "scripts": {
   "test": "lens-test"
 }         
}