1 Star 0 Fork 478

星辰大海 / vue-devui

forked from DevUI / vue-devui 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
jest.config.js 1.28 KB
一键复制 编辑 原始数据 按行查看 历史
ElsaOOo 提交于 2021-10-04 11:14 . feat(upload): 添加upload单测
module.exports = {
// Automatically clear mock calls and instances between every test
clearMocks: true,
// A map from regular expressions to paths to transformers
transform: {
'^.+\\.(ts|tsx|js|jsx)$': [
'babel-jest',
{
presets: [
['@babel/preset-env', { targets: { node: 'current' } }],
['@babel/preset-typescript'],
],
plugins: ['@vue/babel-plugin-jsx'],
},
],
},
transformIgnorePatterns: ['node_modules/?!(lodash-es)'],
// The glob patterns Jest uses to detect test files
testMatch: ['**/**/*.spec.(ts|tsx)'],
// An array of file extensions your modules use
moduleFileExtensions: ['js', 'json', 'ts', 'tsx'],
// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
moduleNameMapper: {
'\\.(css|less|scss|sass)$': '<rootDir>/__mocks__/style-mock.ts',
'\\.(gif|ttf|eot|svg|jpg|png)$': '<rootDir>/__mocks__/file-mock.ts',
},
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
testPathIgnorePatterns: ['/node_modules/'],
// The test environment that will be used for testing
testEnvironment: 'jest-environment-jsdom',
setupFiles: ['<rootDir>/jest.setup.js'],
}
JavaScript
1
https://gitee.com/flxy1028/vue-devui.git
git@gitee.com:flxy1028/vue-devui.git
flxy1028
vue-devui
vue-devui
dev

搜索帮助