-
Notifications
You must be signed in to change notification settings - Fork 669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RangeError: Maximum call stack size exceeded at Array.forEach #647
Comments
What should I do?I use Vue but not localVue,it's can work。 |
@eddyerburgh I use Vue but not localVue,have error: My code contains: |
This is a bug caused by setting watchers to sync. I'm looking into a fix, one solution is a change to Vue core—vuejs/vue#8200 The temporary solution is to use Vue.nextTick and set test('use Vue.nextTick', (done) => {
const wrapper = mount(TestComponent, { sync: false })
wrapper.trigger('click')
Vue.nextTick(() => {
expect(wrapper.text()).toBe('updated')
done()
})
}) |
@eddyerburgh Thank you. It's done. |
Had the same issue when specified Component.ts file instead of Component.vue file. Component.ts is the script used in Component.vue script section via |
Although you had the same error, I believe this is a different issue @alendorff . Could you open a new issue with a minimal reproduction that I can debug? |
@eddyerburgh it works fine with correct import, so I don't think it's really necessary. |
@eddyerburgh This is still a problem with latest vue 2.5.22, workaround is still required. Is this normal ? |
@Overdrivr Could you open a new issue with a minimal reproduction that I can debug? |
I'm swamped with work as of now, but I'll try ;) |
Version
1.0.0-beta.16
Reproduction link
https://github.com/yunweb/vue-jest-iview
Steps to reproduce
I was reporting an error when testing my project with Jest. After various investigations, I found that the problem was caused by the use of vue-i18n. When I had each internationalization file (en-US.js, zh-CN When .js, zh-TW.js, vi-VN.js, etc.) exceed 500 lines, it will appear
RangeError: Maximum call stack size exceeded at Array.forEach () at orderDeps (node_modules/_@[email protected]@/dist/vue-test-utils.js:3006:16)
What is expected?
PASS
What is actually happening?
RangeError: Maximum call stack size exceeded
at Array.forEach ()
Internationalization related code:
Test assertion related code:
The text was updated successfully, but these errors were encountered: