mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
chore: reuse jest config
This commit is contained in:
parent
6e70b5c9e9
commit
5fcc5d493b
20 changed files with 82 additions and 116 deletions
9
jest/config.js
Normal file
9
jest/config.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
module.exports = {
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
||||
transform: {
|
||||
'^.+\\.(js|jsx|ts|tsx)$': 'babel-jest',
|
||||
},
|
||||
verbose: true,
|
||||
collectCoverage: true,
|
||||
coveragePathIgnorePatterns: ['node_modules', 'fixtures'],
|
||||
};
|
|
@ -1,9 +1,3 @@
|
|||
module.exports = {
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
||||
transform: {
|
||||
'^.+\\.(js|jsx|ts|tsx)$': 'babel-jest',
|
||||
},
|
||||
verbose: true,
|
||||
collectCoverage: true,
|
||||
coveragePathIgnorePatterns: ['node_modules', 'fixtures'],
|
||||
};
|
||||
const config = require('../../jest/config');
|
||||
|
||||
module.exports = Object.assign({}, config, {});
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
module.exports = {
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
||||
transform: {
|
||||
'^.+\\.(js|jsx|ts|tsx)$': 'babel-jest',
|
||||
},
|
||||
verbose: true,
|
||||
collectCoverage: true,
|
||||
coveragePathIgnorePatterns: ['node_modules', 'fixtures'],
|
||||
};
|
||||
const config = require('../../jest/config');
|
||||
|
||||
module.exports = Object.assign({}, config, {});
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
module.exports = {
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
||||
transform: {
|
||||
'^.+\\.(js|jsx|ts|tsx)$': 'babel-jest',
|
||||
},
|
||||
verbose: true,
|
||||
collectCoverage: true,
|
||||
coveragePathIgnorePatterns: ['node_modules', 'fixtures'],
|
||||
};
|
||||
const config = require('../../jest/config');
|
||||
|
||||
module.exports = Object.assign({}, config, {});
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
module.exports = {
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
||||
transform: {
|
||||
'^.+\\.(js|jsx|ts|tsx)$': 'babel-jest',
|
||||
},
|
||||
verbose: true,
|
||||
collectCoverage: true,
|
||||
coveragePathIgnorePatterns: ['node_modules', 'fixtures'],
|
||||
};
|
||||
const config = require('../../jest/config');
|
||||
|
||||
module.exports = Object.assign({}, config, {});
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
module.exports = {
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
||||
transform: {
|
||||
'^.+\\.(js|jsx|ts|tsx)$': 'babel-jest',
|
||||
},
|
||||
verbose: true,
|
||||
collectCoverage: true,
|
||||
coveragePathIgnorePatterns: ['node_modules', 'fixtures'],
|
||||
};
|
||||
const config = require('../../jest/config');
|
||||
|
||||
module.exports = Object.assign({}, config, {});
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
module.exports = {
|
||||
moduleFileExtensions: ['ts', 'js'],
|
||||
transform: {
|
||||
'^.+\\.(js|ts)$': 'babel-jest',
|
||||
},
|
||||
verbose: true,
|
||||
// FIXME: the coverage returns an error here
|
||||
const config = require('../../jest/config');
|
||||
|
||||
module.exports = Object.assign({}, config, {
|
||||
collectCoverage: false
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
"extends": "../../tsconfig",
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./build"
|
||||
"outDir": "./build",
|
||||
"allowSyntheticDefaultImports": true
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["src/**/*.test.ts"]
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
module.exports = {
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
||||
transform: {
|
||||
'^.+\\.(js|jsx|ts|tsx)$': 'babel-jest',
|
||||
},
|
||||
verbose: true,
|
||||
collectCoverage: false,
|
||||
coveragePathIgnorePatterns: ['node_modules', 'fixtures'],
|
||||
};
|
||||
const config = require('../../jest/config');
|
||||
|
||||
module.exports = Object.assign({}, config, {
|
||||
collectCoverage: false
|
||||
});
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ const Logger = require('bunyan');
|
|||
const Error = require('http-errors');
|
||||
const Stream = require('stream');
|
||||
const _ = require('lodash');
|
||||
const dayjs = require('dayjs');
|
||||
|
||||
const pkgJSON = require('../package.json');
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
"extends": "../../tsconfig",
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./build"
|
||||
"outDir": "./build",
|
||||
"allowSyntheticDefaultImports": true
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["src/**/*.test.ts"]
|
||||
|
|
6
packages/middleware/jest.config.js
Normal file
6
packages/middleware/jest.config.js
Normal file
|
@ -0,0 +1,6 @@
|
|||
const config = require('../../jest/config');
|
||||
|
||||
module.exports = Object.assign({}, config, {
|
||||
collectCoverage: true
|
||||
});
|
||||
|
|
@ -1,9 +1,6 @@
|
|||
module.exports = {
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
||||
transform: {
|
||||
'^.+\\.(js|jsx|ts|tsx)$': 'babel-jest',
|
||||
},
|
||||
verbose: true,
|
||||
collectCoverage: true,
|
||||
coveragePathIgnorePatterns: ['node_modules', 'fixtures'],
|
||||
};
|
||||
const config = require('../../jest/config');
|
||||
|
||||
module.exports = Object.assign({}, config, {
|
||||
collectCoverage: true
|
||||
});
|
||||
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
module.exports = {
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
||||
transform: {
|
||||
'^.+\\.(js|jsx|ts|tsx)$': 'babel-jest',
|
||||
},
|
||||
verbose: true,
|
||||
collectCoverage: true,
|
||||
coveragePathIgnorePatterns: ['node_modules', 'fixtures'],
|
||||
};
|
||||
const config = require('../../jest/config');
|
||||
|
||||
module.exports = Object.assign({}, config, {
|
||||
collectCoverage: true
|
||||
});
|
||||
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
module.exports = {
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
||||
transform: {
|
||||
'^.+\\.(js|jsx|ts|tsx)$': 'babel-jest',
|
||||
},
|
||||
verbose: true,
|
||||
collectCoverage: true,
|
||||
coveragePathIgnorePatterns: ['node_modules', 'fixtures'],
|
||||
};
|
||||
const config = require('../../jest/config');
|
||||
|
||||
module.exports = Object.assign({}, config, {
|
||||
collectCoverage: true
|
||||
});
|
||||
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
module.exports = {
|
||||
moduleFileExtensions: ['ts', 'js'],
|
||||
transform: {
|
||||
'^.+\\.(js|ts)$': 'babel-jest',
|
||||
},
|
||||
verbose: true,
|
||||
const config = require('../../jest/config');
|
||||
|
||||
module.exports = Object.assign({}, config, {
|
||||
setupFilesAfterEnv: ['./jest.setup.js'],
|
||||
// FIXME: coverage fails here
|
||||
collectCoverage: false
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
"extends": "../../tsconfig",
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./build"
|
||||
"outDir": "./build",
|
||||
"allowSyntheticDefaultImports": true
|
||||
},
|
||||
"include": ["src/**/*", "types/*.d.ts"],
|
||||
"exclude": ["src/**/*.test.ts"]
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
module.exports = {
|
||||
moduleFileExtensions: ['ts', 'js'],
|
||||
transform: {
|
||||
'^.+\\.(js|ts)$': 'babel-jest',
|
||||
},
|
||||
verbose: true,
|
||||
const config = require('../../jest/config');
|
||||
|
||||
module.exports = Object.assign({}, config, {
|
||||
// FIXME: coverage fails here
|
||||
collectCoverage: false
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
module.exports = {
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
||||
transform: {
|
||||
'^.+\\.(js|jsx|ts|tsx)$': 'babel-jest',
|
||||
},
|
||||
verbose: true,
|
||||
collectCoverage: false,
|
||||
const config = require('../../jest/config');
|
||||
|
||||
module.exports = Object.assign({}, config, {
|
||||
collectCoverage: true,
|
||||
coveragePathIgnorePatterns: ['node_modules', 'fixtures'],
|
||||
};
|
||||
});
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
"extends": "../../tsconfig",
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./build"
|
||||
"outDir": "./build",
|
||||
"allowSyntheticDefaultImports": true
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["src/**/*.test.ts"]
|
||||
|
|
Loading…
Reference in a new issue