Skip to content

Commit 07df394

Browse files
committed
feat: update wait-for-expect to 1.2.x
1 parent 4eba0d9 commit 07df394

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const $email = await getByLabelText($form, 'Email')
3333
// interact with puppeteer like usual
3434
await $email.type('[email protected]')
3535
// waiting works too!
36-
await wait(() => getByText('Loading...'))
36+
await wait(() => getByText($document, 'Loading...'))
3737
```
3838

3939
A little too un-puppeteer for you? We've got prototype-mucking covered too :)

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
},
4444
"dependencies": {
4545
"dom-testing-library": "^4.1.1",
46-
"wait-for-expect": "^0.4.0"
46+
"wait-for-expect": "^1.2.0"
4747
},
4848
"devDependencies": {
4949
"@patrickhulce/lint": "^2.1.3",

test/index.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ describe('lib/index.ts', () => {
3030

3131
it('should use `wait` properly', async () => {
3232
const {getByText} = getQueriesForElement(await getDocument(page))
33-
await wait(() => getByText('Loaded!'))
33+
await wait(() => getByText('Loaded!'), {timeout: 7000})
3434
expect(await getByText('Loaded!')).toBeTruthy()
35-
}, 7000)
35+
}, 9000)
3636

3737
afterAll(async () => {
3838
await browser.close()

yarn.lock

+1-6
Original file line numberDiff line numberDiff line change
@@ -5564,12 +5564,7 @@ w3c-hr-time@^1.0.1:
55645564
dependencies:
55655565
browser-process-hrtime "^0.1.2"
55665566

5567-
wait-for-expect@^0.4.0:
5568-
version "0.4.0"
5569-
resolved "https://registry.yarnpkg.com/wait-for-expect/-/wait-for-expect-0.4.0.tgz#341c96ab89d6102a0169a9be6cd0de354de92c17"
5570-
integrity sha512-itHoJUKL5P8abjhWRlp3F5QLDY7LokcJkgD78tjrX08ozBakfy9YD4bgxUVuSld8yqjza3ld6Sj7UMMOH/twFA==
5571-
5572-
wait-for-expect@^1.1.1:
5567+
wait-for-expect@^1.1.1, wait-for-expect@^1.2.0:
55735568
version "1.2.0"
55745569
resolved "https://registry.yarnpkg.com/wait-for-expect/-/wait-for-expect-1.2.0.tgz#fdab6a26e87d2039101db88bff3d8158e5c3e13f"
55755570
integrity sha512-EJhKpA+5UHixduMBEGhTFuLuVgQBKWxkFbefOdj2bbk2/OpA5Opsc4aUTGmF+qJ+v3kTGxDRNYwKaT4j6g5n8Q==

0 commit comments

Comments
 (0)