diff --git a/.all-contributorsrc b/.all-contributorsrc
index d1adec87..bf091394 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -188,6 +188,15 @@
"contributions": [
"code"
]
+ },
+ {
+ "login": "lourenci",
+ "name": "Leandro Lourenci",
+ "avatar_url": "https://avatars3.githubusercontent.com/u/2339362?v=4",
+ "profile": "https://blog.lourenci.com/",
+ "contributions": [
+ "bug"
+ ]
}
]
}
diff --git a/README.md b/README.md
index e07bc3ef..8a027cf4 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@
[![downloads][downloads-badge]][npmtrends]
[![MIT License][license-badge]][license]
-[![All Contributors](https://img.shields.io/badge/all_contributors-18-orange.svg?style=flat-square)](#contributors)
+[![All Contributors](https://img.shields.io/badge/all_contributors-19-orange.svg?style=flat-square)](#contributors)
[![PRs Welcome][prs-badge]][prs]
[![Code of Conduct][coc-badge]][coc]
@@ -241,9 +241,13 @@ An element is visible if **all** the following conditions are met:
```html
Zero Opacity Example
-Visibility Hidden Example
+
+ Visibility Hidden Example
+
Display None Example
-Hidden Parent Example
+
+ Hidden Parent Example
+
Visible Example
```
@@ -403,7 +407,9 @@ does not have any classes.
#### Examples
```html
-
+
```
@@ -722,7 +728,7 @@ Thanks goes to these people ([emoji key][emojis]):
| [
Kent C. Dodds](https://kentcdodds.com)
[π»](https://github.com/gnapse/jest-dom/commits?author=kentcdodds "Code") [π](https://github.com/gnapse/jest-dom/commits?author=kentcdodds "Documentation") [π](#infra-kentcdodds "Infrastructure (Hosting, Build-Tools, etc)") [β οΈ](https://github.com/gnapse/jest-dom/commits?author=kentcdodds "Tests") | [
Ryan Castner](http://audiolion.github.io)
[π](https://github.com/gnapse/jest-dom/commits?author=audiolion "Documentation") | [
Daniel Sandiego](https://www.dnlsandiego.com)
[π»](https://github.com/gnapse/jest-dom/commits?author=dnlsandiego "Code") | [
PaweΕ MikoΕajczyk](https://github.com/Miklet)
[π»](https://github.com/gnapse/jest-dom/commits?author=Miklet "Code") | [
Alejandro ΓÑñez Ortiz](http://co.linkedin.com/in/alejandronanez/)
[π](https://github.com/gnapse/jest-dom/commits?author=alejandronanez "Documentation") | [
Matt Parrish](https://github.com/pbomb)
[π](https://github.com/gnapse/jest-dom/issues?q=author%3Apbomb "Bug reports") [π»](https://github.com/gnapse/jest-dom/commits?author=pbomb "Code") [π](https://github.com/gnapse/jest-dom/commits?author=pbomb "Documentation") [β οΈ](https://github.com/gnapse/jest-dom/commits?author=pbomb "Tests") | [
Justin Hall](https://github.com/wKovacs64)
[π¦](#platform-wKovacs64 "Packaging/porting to new platform") |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| [
Anto Aravinth](https://github.com/antoaravinth)
[π»](https://github.com/gnapse/jest-dom/commits?author=antoaravinth "Code") [β οΈ](https://github.com/gnapse/jest-dom/commits?author=antoaravinth "Tests") [π](https://github.com/gnapse/jest-dom/commits?author=antoaravinth "Documentation") | [
Jonah Moses](https://github.com/JonahMoses)
[π](https://github.com/gnapse/jest-dom/commits?author=JonahMoses "Documentation") | [
Εukasz Gandecki](http://team.thebrain.pro)
[π»](https://github.com/gnapse/jest-dom/commits?author=lgandecki "Code") [β οΈ](https://github.com/gnapse/jest-dom/commits?author=lgandecki "Tests") [π](https://github.com/gnapse/jest-dom/commits?author=lgandecki "Documentation") | [
Ivan Babak](https://sompylasar.github.io)
[π](https://github.com/gnapse/jest-dom/issues?q=author%3Asompylasar "Bug reports") [π€](#ideas-sompylasar "Ideas, Planning, & Feedback") | [
Jesse Day](https://github.com/jday3)
[π»](https://github.com/gnapse/jest-dom/commits?author=jday3 "Code") | [
Ernesto GarcΓa](http://gnapse.github.io)
[π»](https://github.com/gnapse/jest-dom/commits?author=gnapse "Code") [π](https://github.com/gnapse/jest-dom/commits?author=gnapse "Documentation") [β οΈ](https://github.com/gnapse/jest-dom/commits?author=gnapse "Tests") | [
Mark Volkmann](http://ociweb.com/mark/)
[π](https://github.com/gnapse/jest-dom/issues?q=author%3Amvolkmann "Bug reports") [π»](https://github.com/gnapse/jest-dom/commits?author=mvolkmann "Code") |
-| [
smacpherson64](https://github.com/smacpherson64)
[π»](https://github.com/gnapse/jest-dom/commits?author=smacpherson64 "Code") [π](https://github.com/gnapse/jest-dom/commits?author=smacpherson64 "Documentation") [β οΈ](https://github.com/gnapse/jest-dom/commits?author=smacpherson64 "Tests") | [
John Gozde](https://github.com/jgoz)
[π](https://github.com/gnapse/jest-dom/issues?q=author%3Ajgoz "Bug reports") [π»](https://github.com/gnapse/jest-dom/commits?author=jgoz "Code") | [
Iwona](https://github.com/callada)
[π»](https://github.com/gnapse/jest-dom/commits?author=callada "Code") [π](https://github.com/gnapse/jest-dom/commits?author=callada "Documentation") [β οΈ](https://github.com/gnapse/jest-dom/commits?author=callada "Tests") | [
Lewis](https://github.com/6ewis)
[π»](https://github.com/gnapse/jest-dom/commits?author=6ewis "Code") |
+| [
smacpherson64](https://github.com/smacpherson64)
[π»](https://github.com/gnapse/jest-dom/commits?author=smacpherson64 "Code") [π](https://github.com/gnapse/jest-dom/commits?author=smacpherson64 "Documentation") [β οΈ](https://github.com/gnapse/jest-dom/commits?author=smacpherson64 "Tests") | [
John Gozde](https://github.com/jgoz)
[π](https://github.com/gnapse/jest-dom/issues?q=author%3Ajgoz "Bug reports") [π»](https://github.com/gnapse/jest-dom/commits?author=jgoz "Code") | [
Iwona](https://github.com/callada)
[π»](https://github.com/gnapse/jest-dom/commits?author=callada "Code") [π](https://github.com/gnapse/jest-dom/commits?author=callada "Documentation") [β οΈ](https://github.com/gnapse/jest-dom/commits?author=callada "Tests") | [
Lewis](https://github.com/6ewis)
[π»](https://github.com/gnapse/jest-dom/commits?author=6ewis "Code") | [
Leandro Lourenci](https://blog.lourenci.com/)
[π](https://github.com/gnapse/jest-dom/issues?q=author%3Alourenci "Bug reports") |
diff --git a/src/__tests__/to-have-text-content.js b/src/__tests__/to-have-text-content.js
index 62c572f1..41d8b777 100644
--- a/src/__tests__/to-have-text-content.js
+++ b/src/__tests__/to-have-text-content.js
@@ -73,4 +73,13 @@ describe('.toHaveTextContent', () => {
const {container} = render(``)
expect(container.querySelector('span')).toHaveTextContent('')
})
+
+ test('is case-sensitive', () => {
+ const {container} = render('Sensitive text')
+
+ expect(container.querySelector('span')).toHaveTextContent('Sensitive text')
+ expect(container.querySelector('span')).not.toHaveTextContent(
+ 'sensitive text',
+ )
+ })
})
diff --git a/src/utils.js b/src/utils.js
index e54f7149..bc5420b3 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -116,7 +116,7 @@ function matches(textToMatch, matcher) {
if (matcher instanceof RegExp) {
return matcher.test(textToMatch)
} else {
- return textToMatch.toLowerCase().includes(String(matcher).toLowerCase())
+ return textToMatch.includes(String(matcher))
}
}