test: fix expect in jshandle spec (#927)

This commit is contained in:
Meir Blachman 2020-02-11 19:26:23 +02:00 committed by GitHub
parent 780235479e
commit 5fee93ae96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -160,7 +160,7 @@ module.exports.describe = function({testRunner, expect, CHROMIUM, FFOX, WEBKIT})
const aHandle = await page.evaluateHandle(() => document.querySelector('div').firstChild);
const element = aHandle.asElement();
expect(element).toBeTruthy();
expect(await page.evaluate(e => e.nodeType === HTMLElement.TEXT_NODE, element));
expect(await page.evaluate(e => e.nodeType === HTMLElement.TEXT_NODE, element)).toBeTruthy();
});
it('should work with nullified Node', async({page, server}) => {
await page.setContent('<section>test</section>');