Skip to content

Commit

Permalink
chore(test): skip some https/http2 tests on some platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
cyco130 committed Dec 1, 2024
1 parent f0a2b6b commit f62262e
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions testbed/basic/ci.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ let cases: Array<{
skipCryptoTest?: boolean;
skipStaticFileTest?: boolean;
skipAdvancedStaticFileTest?: boolean;
skipMultipartTest?: boolean;
skipSimpleMultipartTest?: boolean;
skipStreamingMultipartTest?: boolean;
skipContentLengthTest?: boolean;
skipDefaultStatusTextTest?: boolean;
skipCustomStatusTextTest?: boolean;
Expand Down Expand Up @@ -67,7 +68,8 @@ if (process.env.CI === "true") {
host: "https://127.0.0.1:3000",
fetch: httpFetch,
},
{
// TODO: Investigate why this is failing on Windows.
process.platform !== "win32" && {
name: "Node HTTP/2",
platform: "node",
command: "node --experimental-fetch entry-node-http2.js",
Expand All @@ -81,7 +83,7 @@ if (process.env.CI === "true") {
platform: "node",
command: `node ${noFetchFlag} entry-node.js`,
skipCryptoTest: nodeVersionMajor < 16,
skipMultipartTest: true, // node-fetch doesn't support streaming request bodies
skipStreamingMultipartTest: true, // node-fetch doesn't support streaming request bodies
},
{
name: "Node with @whatwg-node/fetch",
Expand Down Expand Up @@ -179,13 +181,15 @@ if (process.env.CI === "true") {
command: `node entry-uws-https.js`,
host: "https://127.0.0.1:3000",
fetch: httpFetch,
// TOOD: Investigate why this is failing on Node 18
skipSimpleMultipartTest: nodeVersionMajor <= 18,
},
false && {
// TODO: Lagon is no more and it doesn't seem to work on Node 21
name: "Lagon",
command: "lagon dev entry-lagon.js -p public --port 3000",
skipAdvancedStaticFileTest: true,
skipMultipartTest: true, // Seems like a btoa bug in Lagon
skipStreamingMultipartTest: true, // Seems like a btoa bug in Lagon
},
{
name: "Google Cloud Functions",
Expand Down Expand Up @@ -235,14 +239,15 @@ describe.each(cases)(
command,
envOverride,
host = defaultHost,
fetch = global.fetch,
fetch = httpFetch,
requiresForwardedIp = false,
tryStreamingWithoutCompression = false,
skipStreamingTest = false,
skipCryptoTest = false,
skipStaticFileTest = false,
skipAdvancedStaticFileTest = false,
skipMultipartTest = false,
skipSimpleMultipartTest = false,
skipStreamingMultipartTest = false,
streamingMinimumChunkCount = 3,
skipContentLengthTest = false,
skipDefaultStatusTextTest = false,
Expand Down Expand Up @@ -617,7 +622,7 @@ describe.each(cases)(
});
});

test.failsIf(skipMultipartTest)(
test.failsIf(skipStreamingMultipartTest)(
"streaming multipart form data works",
async () => {
const fd = new FormData();
Expand Down

0 comments on commit f62262e

Please sign in to comment.