Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

test: failing test for setting JSON equal to null (#314)

Joel Einbinderce74a659e14b
diff --git a/test/evaluation.spec.js b/test/evaluation.spec.js
index f496853975..3542e59f12 100644
--- a/test/evaluation.spec.js
+++ b/test/evaluation.spec.js
@@ -259,6 +259,11 @@ module.exports.describe = function({testRunner, expect, FFOX, CHROME, WEBKIT}) {
})).catch(e => error = e);
expect(error.message).toContain('Error in promise');
});
+ it.skip(FFOX || WEBKIT)('should work even when JSON is set to null', async({page, server}) => {
+ await page.evaluate(() => window.JSON = null);
+ const result = await page.evaluate(() => ({abc: 123}));
+ expect(result).toEqual({abc: 123});
+ })
});
describe('Page.evaluateOnNewDocument', function() {