From 0496b858b9d405860bb9d45918bcf64d56739db5 Mon Sep 17 00:00:00 2001 From: Daeyeon Jeong Date: Fri, 18 Nov 2022 22:05:18 +0900 Subject: [PATCH] test: enable the WPT for `structuredClone` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit So far, all `structuredClone` tests have been just skipped. Signed-off-by: Daeyeon Jeong PR-URL: https://github.com/nodejs/node/pull/45482 Reviewed-By: Michaƫl Zasso Reviewed-By: Colin Ihrig Reviewed-By: Joyee Cheung Reviewed-By: Luigi Pinca Reviewed-By: James M Snell Reviewed-By: Yagiz Nizipli Reviewed-By: Filip Skokan --- test/wpt/status/html/webappapis/structured-clone.json | 4 +++- test/wpt/test-structured-clone.js | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/test/wpt/status/html/webappapis/structured-clone.json b/test/wpt/status/html/webappapis/structured-clone.json index d2a7539641ffb5..873f2f9b46eb03 100644 --- a/test/wpt/status/html/webappapis/structured-clone.json +++ b/test/wpt/status/html/webappapis/structured-clone.json @@ -1,5 +1,7 @@ { "structured-clone.any.js": { - "skip": "Missing File API" + "fail": { + "expected": ["File basic"] + } } } diff --git a/test/wpt/test-structured-clone.js b/test/wpt/test-structured-clone.js index 98ef87184a6ce2..57b990c23cdfb5 100644 --- a/test/wpt/test-structured-clone.js +++ b/test/wpt/test-structured-clone.js @@ -6,8 +6,8 @@ const { WPTRunner } = require('../common/wpt'); const runner = new WPTRunner('html/webappapis/structured-clone'); runner.setInitScript(` - const { Blob } = require('buffer'); - global.Blob = Blob; + const { File } = require('buffer'); + globalThis.File = File; `); runner.runJsTests();