File tree 1 file changed +31
-0
lines changed
1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,37 @@ describe("binding dependencies", () => {
77
77
})
78
78
})
79
79
```
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
+
80
111
4 . ** Use the Arrange-Act-Assert Style**
81
112
5 . ** Measure Code Coverage to Find Missing Test Cases**
82
113
Use [ wallaby app] ( http://wallabyjs.com/app/#/tests ) .
You can’t perform that action at this time.
0 commit comments