enzymejs / chai-enzyme

Chai.js assertions and convenience functions for testing React Components with enzyme
MIT License
787 stars 72 forks source link

contain text assertion does not work if String.prototype.includes is not available #116

Closed rincedd closed 8 years ago

rincedd commented 8 years ago

The following breaks in environments that do not support the ES2015 method String.prototype.includes, such as Internet Explorer and Phantom JS.

expect(wrapper.find('#child')).to.contain.text('Te')

I guess the solution would be to include an appropriate polyfill in the build.

ayrton commented 8 years ago

Closely related to https://github.com/producthunt/chai-enzyme/pull/111

ayrton commented 8 years ago

Merged in #111 so this will no longer be an issue on the next release

rincedd commented 8 years ago

Thanks :+1: