Skip to content

Commit afdc230

Browse files
authored
Merge branch 'main' into patch-1
2 parents b08cddb + 3094eb1 commit afdc230

8 files changed

+53
-8
lines changed

.all-contributorsrc

+36
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,42 @@
641641
"contributions": [
642642
"doc"
643643
]
644+
},
645+
{
646+
"login": "MatanBobi",
647+
"name": "Matan Borenkraout",
648+
"avatar_url": "https://avatars.githubusercontent.com/u/12711091?v=4",
649+
"profile": "https://matan.io",
650+
"contributions": [
651+
"platform"
652+
]
653+
},
654+
{
655+
"login": "yannbf",
656+
"name": "Yann Braga",
657+
"avatar_url": "https://avatars.githubusercontent.com/u/1671563?v=4",
658+
"profile": "https://github.com/yannbf",
659+
"contributions": [
660+
"code"
661+
]
662+
},
663+
{
664+
"login": "IanVS",
665+
"name": "Ian VanSchooten",
666+
"avatar_url": "https://avatars.githubusercontent.com/u/4616705?v=4",
667+
"profile": "https://github.com/IanVS",
668+
"contributions": [
669+
"code"
670+
]
671+
},
672+
{
673+
"login": "cbroeren",
674+
"name": "Chantal Broeren",
675+
"avatar_url": "https://avatars.githubusercontent.com/u/7499806?v=4",
676+
"profile": "http://chantalbroeren.nl",
677+
"contributions": [
678+
"doc"
679+
]
644680
}
645681
],
646682
"repoHost": "https://github.com",

.npmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
registry=http://registry.npmjs.org/
1+
registry=https://registry.npmjs.org/
22
package-lock=false

README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ const selectInput = getByTestId('select-number')
891891
expect(textInput).toHaveValue('text')
892892
expect(numberInput).toHaveValue(5)
893893
expect(emptyInput).not.toHaveValue()
894-
expect(selectInput).not.toHaveValue(['second', 'third'])
894+
expect(selectInput).toHaveValue(['second', 'third'])
895895
```
896896

897897
<hr />
@@ -1355,6 +1355,10 @@ Thanks goes to these people ([emoji key][emojis]):
13551355
</tr>
13561356
<tr>
13571357
<td align="center"><a href="http://tu4mo.com"><img src="https://avatars.githubusercontent.com/u/16735302?v=4?s=100" width="100px;" alt=""/><br /><sub><b>tu4mo</b></sub></a><br /><a href="https://github.com/testing-library/jest-dom/commits?author=tu4mo" title="Documentation">📖</a></td>
1358+
<td align="center"><a href="https://matan.io"><img src="https://avatars.githubusercontent.com/u/12711091?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Matan Borenkraout</b></sub></a><br /><a href="#platform-MatanBobi" title="Packaging/porting to new platform">📦</a></td>
1359+
<td align="center"><a href="https://github.com/yannbf"><img src="https://avatars.githubusercontent.com/u/1671563?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Yann Braga</b></sub></a><br /><a href="https://github.com/testing-library/jest-dom/commits?author=yannbf" title="Code">💻</a></td>
1360+
<td align="center"><a href="https://github.com/IanVS"><img src="https://avatars.githubusercontent.com/u/4616705?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ian VanSchooten</b></sub></a><br /><a href="https://github.com/testing-library/jest-dom/commits?author=IanVS" title="Code">💻</a></td>
1361+
<td align="center"><a href="http://chantalbroeren.nl"><img src="https://avatars.githubusercontent.com/u/7499806?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Chantal Broeren</b></sub></a><br /><a href="https://github.com/testing-library/jest-dom/commits?author=cbroeren" title="Documentation">📖</a></td>
13581362
</tr>
13591363
</table>
13601364

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"dependencies": {
3434
"@babel/runtime": "^7.9.2",
3535
"@types/testing-library__jest-dom": "^5.9.1",
36-
"aria-query": "^4.2.2",
36+
"aria-query": "^5.0.0",
3737
"chalk": "^3.0.0",
3838
"css": "^3.0.0",
3939
"css.escape": "^1.5.1",

src/to-be-checked.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function supportedRolesSentence() {
5757
}
5858

5959
function supportedRoles() {
60-
return Array.from(roles.keys()).filter(roleSupportsChecked)
60+
return roles.keys().filter(roleSupportsChecked)
6161
}
6262

6363
function roleSupportsChecked(role) {

src/to-have-class.js

+5
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ export function toHaveClass(htmlElement, ...params) {
4242
const to = this.isNot ? 'not to' : 'to'
4343
return getMessage(
4444
this,
45+
this.utils.matcherHint(
46+
`${this.isNot ? '.not' : ''}.toHaveClass`,
47+
'element',
48+
this.utils.printExpected(expected.join(' ')),
49+
),
4550
`Expected the element ${to} have EXACTLY defined classes`,
4651
expected.join(' '),
4752
'Received',

src/to-have-description.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import {checkHtmlElement, getMessage, normalize, deprecate} from './utils'
33
// See algoritm: https://www.w3.org/TR/accname-1.1/#mapping_additional_nd_description
44
export function toHaveDescription(htmlElement, checkWith) {
55
deprecate(
6-
'toBeInTheDOM',
7-
'Please use toBeInTheDocument for searching the entire document and toContainElement for searching a specific container.',
6+
'toHaveDescription',
7+
'Please use toHaveAccessibleDescription.',
88
)
99

1010
checkHtmlElement(htmlElement, toHaveDescription, this)

src/utils.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import redent from 'redent'
2-
import {parse} from 'css'
2+
import cssParse from 'css/lib/parse'
33
import isEqual from 'lodash/isEqual'
44

55
class GenericTypeError extends Error {
@@ -100,7 +100,7 @@ class InvalidCSSError extends Error {
100100
}
101101

102102
function parseCSS(css, ...args) {
103-
const ast = parse(`selector { ${css} }`, {silent: true}).stylesheet
103+
const ast = cssParse(`selector { ${css} }`, {silent: true}).stylesheet
104104

105105
if (ast.parsingErrors && ast.parsingErrors.length > 0) {
106106
const {reason, line} = ast.parsingErrors[0]

0 commit comments

Comments
 (0)