You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`ngx-cva-test-suite` provides extensive set of test cases, ensuring your custom controls behave as intended.
9
+
`ngx-cva-test-suite` provides an extensive set of test cases, ensuring your custom controls behave as intended. Package is designed and tested to work properly with both **Jest** and **Jasmine** test runners.
10
10
11
11
It provides various configurations, that allows even the most non-standard components to be properly tested.
12
12
13
+
Among the main features:
14
+
15
+
- ensures the correct amount of calls for the `onChange` function _(incorrect usage may result in extra emissions of `valueChanges` of formControl)_
16
+
- ensures correct triggering of `onTouched` function _(is needed for `touched` state of the control and `updateOn: 'blur'`[strategy](https://angular.io/api/forms/AbstractControl#updateOn) to function properly)_
17
+
- ensures that no extra emissions are present when control is disabled
18
+
- checks for control to be resettable using `AbstractControl.reset()`
19
+
20
+
In the repository you can also [find few simple CVA components](apps/integration/src/app/controls), that are configured properly along with `ngx-cva-test-suite` setup for them.
21
+
13
22
## Installation
14
23
15
24
```
@@ -37,6 +46,53 @@ runValueAccessorTests({
37
46
});
38
47
```
39
48
49
+
## Using host template
50
+
51
+
This type of configuration might become handy, if your CVA component relies on projected content or specific layout to function correctly. A good example of such would be a select component, that gets it's options as projected content.
0 commit comments