diff --git a/lib/jsdom/living/xmlhttprequest.js b/lib/jsdom/living/xmlhttprequest.js index 49781f00ee..b9a15cb14d 100644 --- a/lib/jsdom/living/xmlhttprequest.js +++ b/lib/jsdom/living/xmlhttprequest.js @@ -611,7 +611,7 @@ module.exports = function createXMLHttpRequest(window) { const res = spawnSync( process.execPath, [syncWorkerFile], - { input: flagStr } + { input: flagStr, maxBuffer: Infinity } ); if (res.status !== 0) { throw new Error(res.stderr.toString()); diff --git a/test/web-platform-tests/run-wpts.js b/test/web-platform-tests/run-wpts.js index fd24d9ac7a..fe8d5571bd 100644 --- a/test/web-platform-tests/run-wpts.js +++ b/test/web-platform-tests/run-wpts.js @@ -14,11 +14,13 @@ const validReasons = new Set([ "flaky", "mutates-globals", "needs-node10", - "needs-node11" + "needs-node11", + "needs-node12" ]); const hasNode10 = Number(process.versions.node.split(".")[0]) >= 10; const hasNode11 = Number(process.versions.node.split(".")[0]) >= 11; +const hasNode12 = Number(process.versions.node.split(".")[0]) >= 12; const manifestFilename = path.resolve(__dirname, "wpt-manifest.json"); const manifest = readManifest(manifestFilename); @@ -55,7 +57,8 @@ describe("web-platform-tests", () => { const shouldSkip = ["fail-slow", "timeout", "flaky", "mutates-globals"].includes(reason); const expectFail = (reason === "fail") || (reason === "needs-node10" && !hasNode10) || - (reason === "needs-node11" && !hasNode11); + (reason === "needs-node11" && !hasNode11) || + (reason === "needs-node12" && !hasNode12); if (matchingPattern && shouldSkip) { specify.skip(`[${reason}] ${testFile}`); diff --git a/test/web-platform-tests/to-run.yaml b/test/web-platform-tests/to-run.yaml index 75fcb43cd0..14b3c0f8ba 100644 --- a/test/web-platform-tests/to-run.yaml +++ b/test/web-platform-tests/to-run.yaml @@ -28,7 +28,7 @@ basic.htm: [fail, Unknown] client-hint-request-headers-2.tentative.htm: [fail, Client Hints not implemented] client-hint-request-headers.htm: [fail-slow, Client Hints not implemented] cors-safelisted-request-header.any.html: [fail, Depends on fetch] -credentials-flag.htm: [fail, Unknown] +credentials-flag.htm: [needs-node12, Unknown] image-tainting-in-cross-origin-iframe.sub.html: [timeout, Unknown] origin.htm: [timeout, https://github.com/tmpvar/jsdom/issues/1833] preflight-cache.htm: [timeout, Cache should probably be implemented for simple requests before] @@ -128,7 +128,7 @@ DIR: dom/nodes Comment-constructor.html: [fail, Unknown] DOMImplementation-createDocument.html: [fail, Unknown] Document-URL.html: [fail, Unknown] -Document-characterSet-normalization.html: [fail, Some encodings are not supported - see the whatwg-encoding module] +Document-characterSet-normalization.html: [timeout, Some encodings are not supported - see the whatwg-encoding module] Document-constructor-svg.svg: [fail, Unknown] Document-constructor-xml.xml: [fail, Unknown] Document-constructor.html: [fail, new Document().origin should inherit from current Document] @@ -980,6 +980,7 @@ open-url-worker-origin.htm: [fail, Needs Worker implementation] open-url-worker-simple.htm: [timeout, Needs Worker implementation] overridemimetype-blob.html: [fail, Unknown] overridemimetype-edge-cases.window.html: [fail, Unknown] +response-method.htm: [flaky, Usually fails with a Parse Error in Node.js v12, but occasionally passes as it did in previous versions] responseType-document-in-worker.html: [fail, Needs Worker implementation] responseXML-unavailable-in-worker.html: [fail, Needs Worker implementation] responsedocument-decoding.htm: [fail, Unknown]