test: fix should poll on interval test (#2180)

This commit is contained in:
Darío Kondratiuk 2020-05-11 12:00:53 -03:00 committed by GitHub
parent ae8d97cdf9
commit 437d1b6247
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,7 +50,7 @@ describe('Frame.waitForFunction', function() {
}
return Date.now() - window.__startTime;
}, {}, {polling});
expect(timeDelta).not.toBeLessThan(polling);
expect(await timeDelta.jsonValue()).not.toBeLessThan(polling);
});
it('should throw on polling:mutation', async({page, server}) => {
const error = await page.waitForFunction(() => true, {}, {polling: 'mutation'}).catch(e => e);