w: remove useless jest
parent
7006457001
commit
b0e7512d7a
@ -1,24 +0,0 @@
|
||||
/* eslint-disable import/no-extraneous-dependencies */
|
||||
const spawn = require('cross-spawn');
|
||||
|
||||
const args = ['jest', '--coverage'];
|
||||
const [, , argv2, argv3] = process.argv;
|
||||
|
||||
if (argv2 && !argv2.startsWith('-')) {
|
||||
args.push(argv2);
|
||||
if (argv3 && !argv3.startsWith('-')) {
|
||||
args.push('--collectCoverageFrom');
|
||||
if (argv3.endsWith('.ts')) {
|
||||
args.push(`**/${argv3}`);
|
||||
} else {
|
||||
args.push(`**/${argv3}/**/*.ts`);
|
||||
}
|
||||
args.push(...process.argv.slice(4));
|
||||
} else {
|
||||
args.push(...process.argv.slice(3));
|
||||
}
|
||||
} else {
|
||||
args.push('packages/.+\\.spec\\.ts', ...process.argv.slice(2));
|
||||
}
|
||||
|
||||
spawn('npx', args, { stdio: 'inherit' });
|
@ -1,12 +0,0 @@
|
||||
module.exports = {
|
||||
mongodbMemoryServerOptions: {
|
||||
binary: {
|
||||
version: '4.0.3',
|
||||
skipMD5: true,
|
||||
},
|
||||
instance: {
|
||||
dbName: 'jest',
|
||||
},
|
||||
autoStart: false,
|
||||
},
|
||||
};
|
@ -1,16 +0,0 @@
|
||||
module.exports = {
|
||||
preset: '@shelf/jest-mongodb',
|
||||
transform: {
|
||||
'^.+\\.ts?$': 'ts-jest',
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'js', 'json'],
|
||||
collectCoverage: true,
|
||||
coverageDirectory: '<rootDir>/.coverage',
|
||||
coverageProvider: 'v8',
|
||||
coverageReporters: ['text', 'lcov'],
|
||||
coveragePathIgnorePatterns: [
|
||||
'node_modules/',
|
||||
'tests/',
|
||||
'dist/',
|
||||
],
|
||||
};
|
Loading…
Reference in New Issue