Skip to content

Commit

Permalink
Merge pull request #351 from mollie/pimm/all-tests
Browse files Browse the repository at this point in the history
Unconditionally run all tests.
  • Loading branch information
Pimm authored Jul 9, 2024
2 parents e767ac4 + 12f4245 commit 5117004
Showing 1 changed file with 3 additions and 21 deletions.
24 changes: 3 additions & 21 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -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'
}
Expand Down

0 comments on commit 5117004

Please sign in to comment.