JSPM

@oriflame/config-jest

1.1.28-alpha.0+e64615f5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 21
  • Score
    100M100P100Q117884F
  • License MIT

Reusable Jest config.

Package Exports

  • @oriflame/config-jest

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@oriflame/config-jest) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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