diff options
author | Clement Ho <ClemMakesApps@gmail.com> | 2017-05-05 17:24:29 -0500 |
---|---|---|
committer | Clement Ho <ClemMakesApps@gmail.com> | 2017-05-05 17:24:29 -0500 |
commit | 06455d2fc13ecab2d03904d6427e3e1e55328e02 (patch) | |
tree | a1c8132c21b5da736fb87d72a6067f850d96510f /doc/development/fe_guide/testing.md | |
parent | 0d540530cad8d75ddf15de569944d7eb92cb56a5 (diff) | |
download | gitlab-ce-06455d2fc13ecab2d03904d6427e3e1e55328e02.tar.gz |
[skip ci] add documentation28794-standardize-jasmine-test-describe-block-names-that-test-specific-methods
Diffstat (limited to 'doc/development/fe_guide/testing.md')
-rw-r--r-- | doc/development/fe_guide/testing.md | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/doc/development/fe_guide/testing.md b/doc/development/fe_guide/testing.md index 157c13352ca..a8c264bbd3c 100644 --- a/doc/development/fe_guide/testing.md +++ b/doc/development/fe_guide/testing.md @@ -29,6 +29,33 @@ browser and you will not have access to certain APIs, such as which will have to be stubbed. ### Writing tests + +When writing describe test blocks to test specific functions/methods, +please use the method name as the describe block name. + +```javascript +// Good +describe('methodName', () => { + it('passes', () => { + expect(true).toEqual(true); + }); +}); + +// Bad +describe('#methodName', () => { + it('passes', () => { + expect(true).toEqual(true); + }); +}); + +// Bad +describe('.methodName', () => { + it('passes', () => { + expect(true).toEqual(true); + }); +}); +``` + ### Vue.js unit tests See this [section][vue-test]. |