Skip to content

Commit 42be445

Browse files
committed
Document 'to have text' assertion
1 parent 40a5d1b commit 42be445

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ expect(node, 'to [only] have attributes', {
6464
});
6565
```
6666

67+
**To have text**
68+
69+
Tests the text content of a DOM element
70+
71+
```js
72+
expect(node, 'to have text', 'foo');
73+
```
74+
6775
**To have children**
6876

6977
**Queried for**

0 commit comments

Comments
 (0)