From 36747a6b830a0e3b9ff3ec255b3f9e5cede77ca1 Mon Sep 17 00:00:00 2001 From: Kharchev Date: Thu, 20 Jun 2024 15:13:02 +0200 Subject: [PATCH] fix(jest): add transform for .mjs files --- .changeset/small-mails-hunt.md | 5 +++++ packages/arui-scripts/src/configs/jest/settings.js | 1 + 2 files changed, 6 insertions(+) create mode 100644 .changeset/small-mails-hunt.md diff --git a/.changeset/small-mails-hunt.md b/.changeset/small-mails-hunt.md new file mode 100644 index 00000000..e02e73cf --- /dev/null +++ b/.changeset/small-mails-hunt.md @@ -0,0 +1,5 @@ +--- +'arui-scripts': patch +--- + +Добавлена трансформация .mjs файлов в конфигурации jest diff --git a/packages/arui-scripts/src/configs/jest/settings.js b/packages/arui-scripts/src/configs/jest/settings.js index 23cba351..0551676c 100644 --- a/packages/arui-scripts/src/configs/jest/settings.js +++ b/packages/arui-scripts/src/configs/jest/settings.js @@ -27,6 +27,7 @@ module.exports = { }, transform: { '^.+\\.jsx?$': require.resolve('./babel-transform'), + '^.+\\.mjs$': require.resolve('./babel-transform'), '^.+\\.tsx?$': configs.jestUseTsJest ? require.resolve('ts-jest') : require.resolve('./babel-transform'),