Wondering what’s next for npm?Check out our public roadmap! »

@rajzik/config-jest
TypeScript icon, indicating that this package has built-in type declarations

3.1.5 • Public • Published

Jest Config

Factory functions for creating preset Jest configurations. Primarily used in unison with the Lumos CLI.

Extending config

Update package.json:

{
  "lumos": {
    "jest": {
      "setupFilesAfterEnv": ["@testing-library/jest-dom/extend-expect"]
    }
  }
}

Create file in configs folder:

configs/eslint.js

modules.exports = {
  setupFilesAfterEnv: ['@testing-library/jest-dom/extend-expect'],
};

Settings

Main settings

export interface JestOptions {
  graphql?: boolean;
  react?: boolean;
  node?: boolean;
  srcFolder: string;
  testsFolder: string;
  threshold?: number;
  workspaces?: string[];
  testingLibrary?: boolean;
  testResultFileName?: string;
}

Default values

({
  graphql = false, // Enables/disables support for react
  react = false, // Enables/disabled support for react
  node = false, // Enables/disables support for node
  testingLibrary = false, // Enables/disabled testing library
  threshold = 40, // code coverage threshold
  testResultFileName = 'TEST-RESULTS.xml', // junit output filename
});

Beemo/jest

Install

npm i @rajzik/config-jest

DownloadsWeekly Downloads

33

Version

3.1.5

License

MIT

Unpacked Size

300 kB

Total Files

25

Last publish

Collaborators

  • avatar