[skip ci] add documentation

This commit is contained in:
Clement Ho 2017-05-05 17:24:29 -05:00
parent 0d540530ca
commit 06455d2fc1
1 changed files with 27 additions and 0 deletions

View File

@ -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].