Skip to content

Commit 06712b5

Browse files
committed
Bump kcd-scripts to 10.1.1
1 parent 7c9edc0 commit 06712b5

20 files changed

+258
-258
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"jest-serializer-ansi": "^1.0.3",
5555
"jest-watch-select-projects": "^2.0.0",
5656
"jsdom": "^16.4.0",
57-
"kcd-scripts": "^9.1.0",
57+
"kcd-scripts": "^10.1.1",
5858
"typescript": "^4.1.2"
5959
},
6060
"eslintConfig": {

src/__node_tests__/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ test('works without a browser context on a dom node (JSDOM Fragment)', () => {
6666

6767
expect(dtl.getByLabelText(container, /username/i)).toMatchInlineSnapshot(`
6868
<input
69-
id="username"
69+
id=username
7070
/>
7171
`)
7272
expect(dtl.getByLabelText(container, /password/i)).toMatchInlineSnapshot(`
7373
<input
74-
id="password"
75-
type="password"
74+
id=password
75+
type=password
7676
/>
7777
`)
7878
})

src/__node_tests__/screen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ test('the screen export throws a helpful error message when no global document i
44
expect(() =>
55
screen.getByText(/hello world/i),
66
).toThrowErrorMatchingInlineSnapshot(
7-
`"For queries bound to document.body a global document has to be available... Learn more: https://testing-library.com/s/screen-global-error"`,
7+
`For queries bound to document.body a global document has to be available... Learn more: https://testing-library.com/s/screen-global-error`,
88
)
99
})
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`getByLabelText query will throw the custom error returned by config.getElementError 1`] = `"My custom error: Unable to find a label with the text of: TEST QUERY"`;
3+
exports[`getByLabelText query will throw the custom error returned by config.getElementError 1`] = `My custom error: Unable to find a label with the text of: TEST QUERY`;
44

5-
exports[`getByText query will throw the custom error returned by config.getElementError 1`] = `"My custom error: Unable to find an element with the text: TEST QUERY. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible."`;
5+
exports[`getByText query will throw the custom error returned by config.getElementError 1`] = `My custom error: Unable to find an element with the text: TEST QUERY. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.`;

src/__tests__/ariaAttributes.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ test('`selected` throws on unsupported roles', () => {
55
expect(() =>
66
getByRole('textbox', {selected: true}),
77
).toThrowErrorMatchingInlineSnapshot(
8-
`"\\"aria-selected\\" is not supported on role \\"textbox\\"."`,
8+
`"aria-selected" is not supported on role "textbox".`,
99
)
1010
})
1111

@@ -14,7 +14,7 @@ test('`pressed` throws on unsupported roles', () => {
1414
expect(() =>
1515
getByRole('textbox', {pressed: true}),
1616
).toThrowErrorMatchingInlineSnapshot(
17-
`"\\"aria-pressed\\" is not supported on role \\"textbox\\"."`,
17+
`"aria-pressed" is not supported on role "textbox".`,
1818
)
1919
})
2020

@@ -23,7 +23,7 @@ test('`checked` throws on unsupported roles', () => {
2323
expect(() =>
2424
getByRole('textbox', {checked: true}),
2525
).toThrowErrorMatchingInlineSnapshot(
26-
`"\\"aria-checked\\" is not supported on role \\"textbox\\"."`,
26+
`"aria-checked" is not supported on role "textbox".`,
2727
)
2828
})
2929

@@ -32,7 +32,7 @@ test('`expanded` throws on unsupported roles', () => {
3232
expect(() =>
3333
getByRole('heading', {expanded: true}),
3434
).toThrowErrorMatchingInlineSnapshot(
35-
`"\\"aria-expanded\\" is not supported on role \\"heading\\"."`,
35+
`"aria-expanded" is not supported on role "heading".`,
3636
)
3737
})
3838

@@ -208,7 +208,7 @@ test('`level` throws on unsupported roles', () => {
208208
expect(() =>
209209
getByRole('button', {level: 3}),
210210
).toThrowErrorMatchingInlineSnapshot(
211-
`"Role \\"button\\" cannot have \\"level\\" property."`,
211+
`Role "button" cannot have "level" property.`,
212212
)
213213
})
214214

src/__tests__/base-queries-warn-on-invalid-container.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ describe('synchronous queries throw on invalid container type', () => {
8686
])('%s', (_queryName, query) => {
8787
expect(() =>
8888
query('invalid type for container', 'irrelevant text'),
89-
).toThrowErrorMatchingInlineSnapshot(
90-
`"Expected container to be an Element, a Document or a DocumentFragment but got string."`,
89+
).toThrowError(
90+
`Expected container to be an Element, a Document or a DocumentFragment but got string.`,
9191
)
9292
})
9393
})
@@ -120,8 +120,8 @@ describe('asynchronous queries throw on invalid container type', () => {
120120
queryOptions,
121121
waitOptions,
122122
),
123-
).rejects.toThrowErrorMatchingInlineSnapshot(
124-
`"Expected container to be an Element, a Document or a DocumentFragment but got string."`,
123+
).rejects.toThrowError(
124+
`Expected container to be an Element, a Document or a DocumentFragment but got string.`,
125125
)
126126
})
127127
})

src/__tests__/deprecation-warnings.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ test('deprecation warnings only warn once', async () => {
1111
expect(console.warn.mock.calls).toMatchInlineSnapshot(`
1212
Array [
1313
Array [
14-
"\`wait\` has been deprecated and replaced by \`waitFor\` instead. In most cases you should be able to find/replace \`wait\` with \`waitFor\`. Learn more: https://testing-library.com/docs/dom-testing-library/api-async#waitfor.",
14+
\`wait\` has been deprecated and replaced by \`waitFor\` instead. In most cases you should be able to find/replace \`wait\` with \`waitFor\`. Learn more: https://testing-library.com/docs/dom-testing-library/api-async#waitfor.,
1515
],
1616
Array [
17-
"\`waitForElement\` has been deprecated. Use a \`find*\` query (preferred: https://testing-library.com/docs/dom-testing-library/api-queries#findby) or use \`waitFor\` instead: https://testing-library.com/docs/dom-testing-library/api-async#waitfor",
17+
\`waitForElement\` has been deprecated. Use a \`find*\` query (preferred: https://testing-library.com/docs/dom-testing-library/api-queries#findby) or use \`waitFor\` instead: https://testing-library.com/docs/dom-testing-library/api-async#waitfor,
1818
],
1919
Array [
20-
"\`waitForDomChange\` has been deprecated. Use \`waitFor\` instead: https://testing-library.com/docs/dom-testing-library/api-async#waitfor.",
20+
\`waitForDomChange\` has been deprecated. Use \`waitFor\` instead: https://testing-library.com/docs/dom-testing-library/api-async#waitfor.,
2121
],
2222
]
2323
`)

0 commit comments

Comments
 (0)