1 Star 0 Fork 0

懒懒的狸花猫/tagspaces

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
.github
.tx
.vscode
app
configs
cordova
internals
resources
scripts
tests
web
.editorconfig
.eslintignore
.eslintrc
.gitattributes
.gitignore
.prettierignore
.prettierrc
.stylelintrc
.yarnrc
CHANGELOG.md
CODE_OF_CONDUCT.md
LICENSE.txt
README.md
appveyor.yml
babel.config.js
jest.config.js
package.json
tsconfig.json
yarn.lock
克隆/下载
jest.config.js 1.81 KB
一键复制 编辑 原始数据 按行查看 历史
Stanimir 提交于 5年前 . Add Locations test (#1182)
// const sh = require('shelljs');
const branchName = require('current-git-branch');
const isWin = /^win/.test(process.platform);
const isMac = /^darwin/.test(process.platform);
const isLinux = /^linux/.test(process.platform);
let os = '';
if (isWin) {
os = '_win';
} else if (isMac) {
os = '_macos';
} else if (isLinux) {
os = '_linux';
}
const web = process.env.NODE_JEST === 'test_web' ? '_web' : '';
const minio = process.env.NODE_JEST === 'test_minio' ? '_minio' : '';
module.exports = async () => {
/* const BRANCH_NAME = await new Promise((resolve, reject) => {
sh.exec(
'git symbolic-ref HEAD 2>/dev/null | cut -d"/" -f 3',
(code, stdout, stderr) => {
if (code !== 0) {
const e = new Error();
e.message = stderr;
e.name = String(code);
reject(e);
} else {
resolve(stdout);
}
}
);
}); */
const BRANCH_NAME = branchName();
return {
rootDir: './tests',
verbose: true,
setupFiles: ['../scripts/setup-tests.js'],
moduleNameMapper: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/internals/mocks/fileMock.js',
'\\.(css|less|sass|scss)$': 'identity-obj-proxy'
},
moduleFileExtensions: ['js', 'ts', 'tsx'],
moduleDirectories: ['node_modules', 'app/node_modules'],
testMatch: [
'**/{unit,e2e,app,test,integration}/**/*.{test,e2e}.{js,tsx,ts,tsx}'
],
testPathIgnorePatterns: ['<rootDir>/extensions'],
reporters: [
'default',
[
'../node_modules/jest-html-reporter',
{
pageTitle: BRANCH_NAME + ' Test Report',
outputPath:
'./test-reports/' + BRANCH_NAME + os + web + minio + '.html'
}
]
],
collectCoverage: true,
maxWorkers: 1
};
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/dxpAndroid/tagspaces.git
git@gitee.com:dxpAndroid/tagspaces.git
dxpAndroid
tagspaces
tagspaces
develop

搜索帮助