Closed as not planned
Description
What happened?
Since 4.14.4 (specifically 4f88d85) I see this error when running my tests:
/Users/boboldehampsink/Work/Robuust/zsm-brigante/node_modules/vee-validate/dist/vee-validate.mjs:6
import { getCurrentInstance, inject, warn as warn$1, computed, toValue, ref, watch, nextTick, unref, isRef, reactive, onUnmounted, onMounted, provide, onBeforeUnmount, defineComponent, toRef, resolveDynamicComponent, h, readonly, watchEffect, shallowRef } from 'vue';
^^^^^^
SyntaxError: Cannot use import statement outside a module
27 | } from '@ionic/vue';
28 |
> 29 | import { defineRule } from 'vee-validate';
| ^
30 | import { required, min_value, numeric, email } from '@vee-validate/rules';
31 |
32 | config.global.mocks.$t = (key, params = null) => key;
at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1728:14)
at Object.<anonymous> (tests/unit/index.js:29:1)
Reproduction steps
- Use 4.14.4 or higher
- Use Jest and add an index.js file, with in there:
import { defineRule } from 'vee-validate';
- Run jest
Version
Vue.js 3.x and vee-validate 4.x
What browsers are you seeing the problem on?
- Firefox
- Chrome
- Safari
- Microsoft Edge
Relevant log output
No response
Demo link
no
Code of Conduct
- I agree to follow this project's Code of Conduct