0
Fork 0
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:
Juan Picado @jotadeveloper 2020-03-04 22:36:43 +01:00 committed by Juan Picado
parent 6e70b5c9e9
commit 5fcc5d493b
20 changed files with 82 additions and 116 deletions

9
jest/config.js Normal file
View 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'],
};

View file

@ -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, {});

View file

@ -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, {});

View file

@ -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, {});

View file

@ -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, {});

View file

@ -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, {});

View file

@ -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
};
});

View file

@ -2,7 +2,8 @@
"extends": "../../tsconfig",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./build"
"outDir": "./build",
"allowSyntheticDefaultImports": true
},
"include": ["src/**/*"],
"exclude": ["src/**/*.test.ts"]

View file

@ -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
});

View file

@ -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');

View file

@ -2,7 +2,8 @@
"extends": "../../tsconfig",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./build"
"outDir": "./build",
"allowSyntheticDefaultImports": true
},
"include": ["src/**/*"],
"exclude": ["src/**/*.test.ts"]

View file

@ -0,0 +1,6 @@
const config = require('../../jest/config');
module.exports = Object.assign({}, config, {
collectCoverage: true
});

View file

@ -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
});

View file

@ -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
});

View file

@ -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
});

View file

@ -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
};
});

View file

@ -2,7 +2,8 @@
"extends": "../../tsconfig",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./build"
"outDir": "./build",
"allowSyntheticDefaultImports": true
},
"include": ["src/**/*", "types/*.d.ts"],
"exclude": ["src/**/*.test.ts"]

View file

@ -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
};
});

View file

@ -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'],
};
});

View file

@ -2,7 +2,8 @@
"extends": "../../tsconfig",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./build"
"outDir": "./build",
"allowSyntheticDefaultImports": true
},
"include": ["src/**/*"],
"exclude": ["src/**/*.test.ts"]