Skip to content

RangeError: Maximum call stack size exceeded when use vue-i18n and i18n large json #1125

Closed
@yoyo930021

Description

@yoyo930021

Version

1.0.0-beta.28

Reproduction link

https://github.com/yoyo930021/vue-i18n-test-utils-reproduction

Steps to reproduce

I use vue-i18n and add vue-i18n to vue-test-utils in jest.
Use more large json in i18n.
And more it function

AppNumberSupporter.spec.ts:
https://github.com/yoyo930021/vue-i18n-test-utils-reproduction/blob/master/tests/unit/AppNumberSupporter.spec.ts

i18n.ts:
https://github.com/yoyo930021/vue-i18n-test-utils-reproduction/blob/master/src/i18n.ts

zh-CN.json:
https://github.com/yoyo930021/vue-i18n-test-utils-reproduction/blob/master/src/locales/langs/zh-CN.json

run yarn test:unit

What is expected?

  ● AppNumberSupporter.vue › return data when click odd

    RangeError: Maximum call stack size exceeded
        at Array.forEach (<anonymous>)

      at orderDeps (node_modules/@vue/test-utils/dist/vue-test-utils.js:2553:16)
          at Array.forEach (<anonymous>)
      at node_modules/@vue/test-utils/dist/vue-test-utils.js:2558:14
          at Array.forEach (<anonymous>)
      at orderDeps (node_modules/@vue/test-utils/dist/vue-test-utils.js:2553:16)
          at Array.forEach (<anonymous>)
      at node_modules/@vue/test-utils/dist/vue-test-utils.js:2558:14

and more duplicate error.

What is actually happening?

PASS Test.


I will try sync: false.
Better than not use, but unsolved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions