Added text to Include to allow contain.text

This commit is contained in:
Robert Buehler 2017-09-01 10:06:51 -05:00
parent cb2dbfbb50
commit 448d609ece
2 changed files with 7 additions and 0 deletions

View File

@ -30,6 +30,7 @@ expect(wrapper).to.have.ref("test");
expect(wrapper).to.be.selected();
expect(wrapper).to.have.tagName("div");
expect(wrapper).to.have.text("");
expect(wrapper).to.contain.text("");
expect(wrapper).to.have.type(Test);
expect(wrapper).to.have.value("test");
expect(wrapper).to.have.attr("test", "test");

View File

@ -26,6 +26,12 @@ declare namespace Chai {
* @param code
*/
(selector: EnzymeSelector): Assertion;
/**
* Assert that the given wrapper has the supplied text:
* @param str
*/
text(str?: string): Assertion;
}
interface Assertion {
/**