How to use the tdd-buffet/config/jest.config.moduleNameMapper function in tdd-buffet

To help you get started, we’ve selected a few tdd-buffet examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NiGhTTraX / mugshot / tests / jest.config.js View on Github external
const baseConfig = require('tdd-buffet/config/jest.config');

module.exports = {
  ...baseConfig,

  // For some reason Jest will complain that this is duplicating the packages/mugshot/package.json.
  modulePathIgnorePatterns: ['/package.json'],
  moduleNameMapper: {
    ...baseConfig.moduleNameMapper,
    // For some reason the ts-jest helper doesn't pick this one up.
    '^mugshot/(.*)$': '/packages/mugshot/$1'
  },

  // We're doing multiple coverage runs so we don't want to print the table every time
  // and we want to check thresholds once at the end with nyc.
  coverageReporters: ['json', 'html'],
  coverageThreshold: undefined
};

tdd-buffet

All you can eat TDD tools and libraries

MIT
Latest version published 11 months ago

Package Health Score

58 / 100
Full package analysis