New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@lg-tools/test

Package Overview
Dependencies
Maintainers
5
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lg-tools/test

Jest setup & config for LeafyGreen repositories

latest
npmnpm
Version
0.5.1
Version published
Maintainers
5
Created
Source

@lg-tools/test

Shared test config & scripts for LeafyGreen repositories.

Usage

It's best not to use this as a standalone package, but use it as part of @lg-tools/cli instead.

To run tests using the shared config, use the lg cli:

> lg test

Options

To see all options for this command run:

> lg test --help

Extending & overriding the shared config

To extend/override the shared config (located in @lg-tools/test/config), create a jest.config.js file at the root of the repository, and extend the default config with the code below:

// ./jest.config.js
const jestConfig = require('@lg-tools/test/config/js.config.js');

module.exports = {
  ...jestConfig,
  // extend your jest config here
};

You can also pass a --config option to the test command:

> lg test --config ./path/to/config

Testing in React 17

In CI we test our components using React 17.

To do this manually, first run the init script in order to install the specific testing dependencies needed for React 17. (yarn init17 from the repo root)

> yarn init17

Next, run your tests with the --react17 flag. This ensures that the tests are run with specific Jest config for React 17.

> yarn test --react17

To go back to the default version of React you'll need to clear your packages and re-build:

> yarn clean:modules && yarn run init

FAQs

Package last updated on 17 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts