Closed shuson closed 7 years ago
Hi, I applied i18n plugin of webpack to my code, which will wrap String variables as __("Hello World"), the problem occurs when run Unit Test/
It says __ cannot be found.
Any idea? To mock it or load from somewhere else
I have such mock in my test_helpers.js:
test_helpers.js
global.__ = str => str;
@shuson as @nosovsh mentioned, we have to add the shim by ourselves if you are not using webpack and same webpack configuration 😃
Hi, I applied i18n plugin of webpack to my code, which will wrap String variables as __("Hello World"), the problem occurs when run Unit Test/
It says __ cannot be found.
Any idea? To mock it or load from somewhere else