diff --git a/jest.config.js b/jest.config.js index ebd9601a..ecfc6814 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,25 +1,7 @@ -const nockfulTests = ['communication', 'iteration', 'paymentLinks', 'profiles', 'settlements']; - -function createProject(displayName, testRegex, rest) { - return Object.assign({}, rest, { - testEnvironment: 'node', - setupFilesAfterEnv: ['jest-bluster'], - displayName, - testRegex - }); -} - -const projects = [ - createProject('nockless tests', `/tests/(?!${nockfulTests.join('|')}).*/.+\\.test\\.[jt]s$`) -]; - -// Only execute the Nockful tests on Node.js 8+. -if (parseInt(process.version.substring(1)) >= 8) { - projects.push(createProject('nockful tests', `/tests/(?:${nockfulTests.join('|')}).*/.+\\.test\\.[jt]s$`)); -} - module.exports = { - projects, + testEnvironment: 'node', + setupFilesAfterEnv: ['jest-bluster'], + testRegex: '/tests/.*/.+\\.test\\.[jt]s$', transform: { '\\.[jt]s$': 'babel-jest' }