@llui/test 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -16
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -39,18 +39,18 @@ testView(def, state?) => ViewHarness<M>
|
|
|
39
39
|
|
|
40
40
|
Mount a component into jsdom with full DOM. Returns a harness with DOM query and interaction methods.
|
|
41
41
|
|
|
42
|
-
| Method
|
|
43
|
-
|
|
|
44
|
-
| `.send(msg)`
|
|
45
|
-
| `.flush()`
|
|
46
|
-
| `.click(selector)`
|
|
47
|
-
| `.input(selector, val)`
|
|
48
|
-
| `.text(selector)`
|
|
49
|
-
| `.attr(selector, name)`
|
|
50
|
-
| `.query(selector)`
|
|
51
|
-
| `.queryAll(selector)`
|
|
52
|
-
| `.fire(selector, event)
|
|
53
|
-
| `.unmount()`
|
|
42
|
+
| Method | Description |
|
|
43
|
+
| ------------------------ | ----------------------------------------------- |
|
|
44
|
+
| `.send(msg)` | Dispatch a message |
|
|
45
|
+
| `.flush()` | Force synchronous update (skip microtask queue) |
|
|
46
|
+
| `.click(selector)` | Simulate click on element |
|
|
47
|
+
| `.input(selector, val)` | Set input value and fire input event |
|
|
48
|
+
| `.text(selector)` | Get textContent of element |
|
|
49
|
+
| `.attr(selector, name)` | Get attribute value |
|
|
50
|
+
| `.query(selector)` | querySelector on mounted DOM |
|
|
51
|
+
| `.queryAll(selector)` | querySelectorAll on mounted DOM |
|
|
52
|
+
| `.fire(selector, event)` | Dispatch a custom event |
|
|
53
|
+
| `.unmount()` | Tear down the component and clean up |
|
|
54
54
|
|
|
55
55
|
### assertEffects
|
|
56
56
|
|
|
@@ -75,7 +75,3 @@ replayTrace(def, trace) => void
|
|
|
75
75
|
```
|
|
76
76
|
|
|
77
77
|
Replay a recorded message trace against a component definition. Asserts state at each step.
|
|
78
|
-
|
|
79
|
-
## License
|
|
80
|
-
|
|
81
|
-
MIT
|