mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-23 22:27:34 -05:00
a1f78368c4
* rename method * Update ui-components.md * clean up jest * docs: add pages to ui components * Update ui-components.yml * chore: add some example docs
38 lines
1.3 KiB
JavaScript
38 lines
1.3 KiB
JavaScript
const config = require('../../../jest/config');
|
|
|
|
module.exports = Object.assign({}, config, {
|
|
testEnvironment: 'jest-environment-jsdom-global',
|
|
transform: {
|
|
'^.+\\.(js|ts|tsx)$': 'babel-jest',
|
|
},
|
|
moduleFileExtensions: ['js', 'ts', 'tsx'],
|
|
testEnvironmentOptions: {
|
|
url: 'http://localhost:9000/',
|
|
},
|
|
rootDir: '..',
|
|
setupFilesAfterEnv: ['@testing-library/jest-dom/extend-expect', '<rootDir>/jest/setup-env.ts'],
|
|
setupFiles: ['<rootDir>/jest/setup.ts'],
|
|
transformIgnorePatterns: ['<rootDir>/node_modules/(?!react-syntax-highlighter)'],
|
|
snapshotSerializers: ['@emotion/jest/serializer'],
|
|
collectCoverageFrom: ['src/**/*.{ts,tsx}', '!**/node_modules/**'],
|
|
modulePathIgnorePatterns: ['<rootDir>/build/'],
|
|
moduleNameMapper: {
|
|
'\\.(s?css)$': '<rootDir>/jest/identity.js',
|
|
'\\.(png)$': '<rootDir>/jest/identity.js',
|
|
'\\.(svg)$': '<rootDir>/jest/unit/empty.ts',
|
|
'\\.(jpg)$': '<rootDir>/jest/unit/empty.ts',
|
|
'\\.(md)$': '<rootDir>/jest/unit/empty-string.ts',
|
|
'github-markdown-css': '<rootDir>/jest/identity.js',
|
|
'react-markdown': '<rootDir>/src/__mocks__/react-markdown.tsx',
|
|
'remark-*': '<rootDir>/src/__mocks__/remark-plugin.ts',
|
|
},
|
|
coverageReporters: [['text', { skipFull: true }]],
|
|
coverageThreshold: {
|
|
global: {
|
|
branches: 68,
|
|
functions: 65,
|
|
lines: 73,
|
|
statements: 73,
|
|
},
|
|
},
|
|
});
|