Commit cb28bcf5 authored by Luke Bennett's avatar Luke Bennett

Separate spyOnDependency docs examples

parent 455ae726
...@@ -141,14 +141,15 @@ module. GitLab has a custom `spyOnDependency` method which utilizes ...@@ -141,14 +141,15 @@ module. GitLab has a custom `spyOnDependency` method which utilizes
[babel-plugin-rewire](https://github.com/speedskater/babel-plugin-rewire) to [babel-plugin-rewire](https://github.com/speedskater/babel-plugin-rewire) to
achieve this. It can be used like so: achieve this. It can be used like so:
```javascript ```js
// my_module.js // my_module.js
import { visitUrl } from '~/lib/utils/url_utility'; import { visitUrl } from '~/lib/utils/url_utility';
export default function doSomething() { export default function doSomething() {
visitUrl('/foo/bar'); visitUrl('/foo/bar');
} }
```
```js
// my_module_spec.js // my_module_spec.js
import doSomething from '~/my_module'; import doSomething from '~/my_module';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment