From 12f42451ecd25cee47f1baa8fc9d22d378c6c76e Mon Sep 17 00:00:00 2001 From: "Pimm \"de Chinchilla\" Hogeling" Date: Tue, 9 Jul 2024 12:28:02 +0200 Subject: [PATCH] Unconditionally run all tests. Previously, some tests were skipped on older Node.js versions because they rely on Nock, which is unsupported by Node.js < 8.0.0. We are currently figuring out which Node.js versions 4.0.0 of the client will support, but we plan on raising it to at least 8.0.0. --- jest.config.js | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) 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' }