1 Star 0 Fork 480

freedomlovey/vue-devui

forked from DevUI/vue-devui 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
jest.config.js 1.22 KB
一键复制 编辑 原始数据 按行查看 历史
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'],
},
],
},
// 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'],
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/freedomlovey/vue-devui.git
git@gitee.com:freedomlovey/vue-devui.git
freedomlovey
vue-devui
vue-devui
dev

搜索帮助