jest.config.js 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. /*eslint-env node*/
  2. module.exports = {
  3. verbose: false,
  4. collectCoverageFrom: [
  5. 'tests/js/spec/**/*.{js,jsx}',
  6. 'src/sentry/static/sentry/app/**/*.{js,jsx}',
  7. ],
  8. coverageReporters: ['html', 'lcov', 'cobertura'],
  9. coverageDirectory: '.artifacts/coverage/',
  10. snapshotSerializers: ['enzyme-to-json/serializer'],
  11. moduleNameMapper: {
  12. '^app-test/(.*)': '<rootDir>/tests/js/$1',
  13. '^app-test-helpers(.*)': '<rootDir>/tests/js/helpers$1',
  14. '\\.(css|less|png)$': '<rootDir>/tests/js/helpers/importStyleMock.js',
  15. '\\.(svg)$': '<rootDir>/tests/js/helpers/svgMock.js',
  16. jquery: '<rootDir>/src/sentry/static/sentry/__mocks__/jquery.jsx',
  17. 'integration-docs-platforms':
  18. '<rootDir>/tests/fixtures/integration-docs/_platforms.json',
  19. },
  20. modulePaths: ['<rootDir>/src/sentry/static/sentry'],
  21. setupFiles: [
  22. '<rootDir>/tests/js/throw-on-react-error.js',
  23. '<rootDir>/tests/js/setup.js',
  24. ],
  25. setupTestFrameworkScriptFile: '<rootDir>/tests/js/setupFramework.js',
  26. testMatch: ['<rootDir>/tests/js/**/?(*.)(spec|test).js?(x)'],
  27. testPathIgnorePatterns: ['<rootDir>/tests/sentry/lang/javascript/'],
  28. unmockedModulePathPatterns: [
  29. '<rootDir>/node_modules/react',
  30. '<rootDir>/node_modules/reflux',
  31. ],
  32. };