Description
Version
1.0.0-beta.26
Reproduction link
https://github.com/AlexandreBonaventure/repro-test-utils-setProps
Steps to reproduce
git clone https://github.com/AlexandreBonaventure/repro-test-utils-setProps
> yarn install
> yarn test:unit
What is expected?
No performance issue across all tests
What is actually happening?
Performance is affected when using more and more messages in vue-i18n
Hello,
I stumbled upon a performance issue when using wrapper.setProps and vue-i18n. For some reasons, tests are running slower and slower with the increased amount of entries (0 -> 3000 lines) in vue-i18n messages (translations), eventually ending up in a RangeError. I know some people will tell me that I could either mock or get rid of vue-i18n in my test, but it is very convenient to do so to track untranslated messages in a vue app. At my company we are using it extensively. Moreover, I don't think we should experience this kind a performance issue anyway and that let me believe this is a code smell in the way test-utils reorders dependencies.
without message + with 1000 lines messages
with 3000 lines messages
NB: using a wrapper factory instead of setProps is fixing the issue as well.
Thanks