test: enable the WPT for structuredClone

So far, all `structuredClone` tests have been just skipped.

Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/45482
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
This commit is contained in:
Daeyeon Jeong 2022-11-18 22:05:18 +09:00 committed by GitHub
parent 5b8b92176e
commit 0496b858b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -1,5 +1,7 @@
{
"structured-clone.any.js": {
"skip": "Missing File API"
"fail": {
"expected": ["File basic"]
}
}
}

View File

@ -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();