Skip to content

Commit bcd81b5

Browse files
authored
Update README.md
1 parent 7e689eb commit bcd81b5

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,37 @@ describe("binding dependencies", () => {
7777
})
7878
})
7979
```
80+
In Angular use describe statement to separate unit tests, template shallow tests and integration tests:
81+
82+
```javascript
83+
describe('unit tests', () => {
84+
describe('[unit of work]', () => {
85+
describe('when [scenario/context]', () => {
86+
it('should [expected behaviour]', () => {
87+
});
88+
});
89+
});
90+
});
91+
92+
describe('template shallow tests', () => {
93+
describe('[unit of work]', () => {
94+
describe('when [scenario/context]', () => {
95+
it('should [expected behaviour]', () => {
96+
});
97+
});
98+
});
99+
});
100+
101+
describe('integration tests', () => {
102+
describe('[unit of work]', () => {
103+
describe('when [scenario/context]', () => {
104+
it('should [expected behaviour]', () => {
105+
});
106+
});
107+
});
108+
});
109+
```
110+
80111
4. **Use the Arrange-Act-Assert Style**
81112
5. **Measure Code Coverage to Find Missing Test Cases**
82113
Use [wallaby app](http://wallabyjs.com/app/#/tests).

0 commit comments

Comments
 (0)