diff --git a/docs/en/workflow/testing-with-mocks.md b/docs/en/workflow/testing-with-mocks.md index 7cff72e85..b2f728ca5 100644 --- a/docs/en/workflow/testing-with-mocks.md +++ b/docs/en/workflow/testing-with-mocks.md @@ -4,6 +4,8 @@ In a real world application, our components most likely have external dependenci `vue-loader` provides a feature that allows you to inject arbitrary dependencies to a `*.vue` component, using [inject-loader](https://github.com/plasticine/inject-loader). The general idea is that instead of directly importing the component module, we use `inject-loader` to create a "module factory" function for that module. When this function gets called with an object of mocks, it returns an instance of the module with the mocks injected. +> Note: You must disable `esModule` option in inject mode, or you will get an error. + Suppose we have a component like this: ``` html @@ -14,9 +16,9 @@ Suppose we have a component like this: