Skip to content

Commit 9768a2b

Browse files
authored
fix: corrects deprecation warning for waitForDomChange (#478)
1 parent 98e5bb3 commit 9768a2b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/__tests__/wait-for-dom-change.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ test('waits for the dom to change in the document', async () => {
3838
expect(console.warn.mock.calls).toMatchInlineSnapshot(`
3939
Array [
4040
Array [
41-
"\`waitForDomChange\` has been deprecated. Use \`wait\` instead: https://testing-library.com/docs/dom-testing-library/api-async#waitfor.",
41+
"\`waitForDomChange\` has been deprecated. Use \`waitFor\` instead: https://testing-library.com/docs/dom-testing-library/api-async#waitfor.",
4242
],
4343
]
4444
`)

src/wait-for-dom-change.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function waitForDomChange({
2626
if (!hasWarned) {
2727
hasWarned = true
2828
console.warn(
29-
`\`waitForDomChange\` has been deprecated. Use \`wait\` instead: https://testing-library.com/docs/dom-testing-library/api-async#waitfor.`,
29+
`\`waitForDomChange\` has been deprecated. Use \`waitFor\` instead: https://testing-library.com/docs/dom-testing-library/api-async#waitfor.`,
3030
)
3131
}
3232
return new Promise((resolve, reject) => {

0 commit comments

Comments
 (0)