fix types in other test

This commit is contained in:
Simon Knott 2024-09-02 10:33:03 +02:00
parent 4cdf5b782d
commit 3c5d9d11ff
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC

View file

@ -176,7 +176,9 @@ test('should support .not predicate', async ({ runInlineTest }) => {
test('should support custom matchers', async ({ runInlineTest }) => {
const result = await runInlineTest({
'a.spec.ts': `
expect.extend({
import { test, expect as baseExpect } from '@playwright/test';
const expect = baseExpect.extend({
toBeWithinRange(received, floor, ceiling) {
const pass = received >= floor && received <= ceiling;
if (pass) {
@ -195,10 +197,9 @@ test('should support custom matchers', async ({ runInlineTest }) => {
},
});
import { test, expect } from '@playwright/test';
test('should poll', async () => {
let i = 0;
await test.expect.poll(() => ++i).toBeWithinRange(3, Number.MAX_VALUE);
await expect.poll(() => ++i).toBeWithinRange(3, Number.MAX_VALUE);
});
`
});