Commit ad656410 authored by Evan Read's avatar Evan Read

Merge branch 'Separate-spyOnDependency-docs-examples' into 'master'

Separate spyOnDependency docs examples

See merge request gitlab-org/gitlab-ce!25449
parents 9ec107ff cb28bcf5
...@@ -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