diff --git a/jest.config.js b/jest.config.mjs similarity index 90% rename from jest.config.js rename to jest.config.mjs index e8d7d6c57e..8dbaaf940c 100644 --- a/jest.config.js +++ b/jest.config.mjs @@ -14,10 +14,19 @@ const config = { // See: https://jestjs.io/docs/ecmascript-modules transform: { '^.+\\.m?js$': ['babel-jest', { rootMode: 'upward' }] - } + }, + + // Enable Babel transforms for ESM-only node_modules + // See: https://jestjs.io/docs/ecmascript-modules + transformIgnorePatterns: [ + `/node_modules/(?!${[ + 'del', + 'slash' + ].join('|')}/)` + ] } -module.exports = { +export default { collectCoverageFrom: ['./src/**/*.{js,mjs}'], projects: [ {