diff options
author | Luke Bennett <lbennett@gitlab.com> | 2019-02-21 06:47:08 +0300 |
---|---|---|
committer | Luke Bennett <lbennett@gitlab.com> | 2019-02-21 06:47:08 +0300 |
commit | cb28bcf56801d0c0f8a929129b0e489ecb6844b5 (patch) | |
tree | f453de3bb83d9249e21257613ce379b28988bc6e /doc/development | |
parent | 455ae72682ba47c4a679a4b30b01e565ffb08204 (diff) |
Separate spyOnDependency docs examples
Diffstat (limited to 'doc/development')
-rw-r--r-- | doc/development/testing_guide/frontend_testing.md | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/development/testing_guide/frontend_testing.md b/doc/development/testing_guide/frontend_testing.md index 6012f1080ab..0470a071d39 100644 --- a/doc/development/testing_guide/frontend_testing.md +++ b/doc/development/testing_guide/frontend_testing.md @@ -141,14 +141,15 @@ module. GitLab has a custom `spyOnDependency` method which utilizes [babel-plugin-rewire](https://github.com/speedskater/babel-plugin-rewire) to achieve this. It can be used like so: -```javascript +```js // my_module.js import { visitUrl } from '~/lib/utils/url_utility'; export default function doSomething() { visitUrl('/foo/bar'); } - +``` +```js // my_module_spec.js import doSomething from '~/my_module'; |