Skip to content

Commit 60f81db

Browse files
committed
Skip test broken by new Node bug
1 parent 3504da0 commit 60f81db

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

test/request-utils.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ import * as zlib from 'zlib';
22
import * as brotliPromise from 'brotli-wasm';
33
import { ZstdCodec, ZstdStreaming } from 'zstd-codec';
44

5-
import { expect } from './test-utils';
5+
import * as semver from 'semver';
6+
7+
import { expect, BROKEN_WASM_BUFFER_ISSUE } from './test-utils';
68
import { buildBodyReader } from '../src/util/request-utils';
79

810
const zstd: Promise<ZstdStreaming> = new Promise((resolve) =>
@@ -74,6 +76,7 @@ describe("buildBodyReader", () => {
7476
});
7577

7678
it('can decode zstandard bodies', async function () {
79+
if (semver.satisfies(process.version, BROKEN_WASM_BUFFER_ISSUE)) this.skip();
7780
this.timeout(5000); // Zstd can be slow to load (inside the body reader, not just here)
7881

7982
const content = Buffer.from((await zstd).compress(Buffer.from('hello zstd zstd zstd world')));

test/test-utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ export const DEFAULT_KEEP_ALIVE = ">=19";
264264
export const FIXED_KEEP_ALIVE_BEHAVIOUR = ">=20";
265265
export const CHUNKED_ENCODING_BUG = "<16";
266266
export const BROKEN_H2_OVER_H2_TUNNELLING = "~20.12"; // https://github.com/nodejs/node/issues/52344
267+
export const BROKEN_WASM_BUFFER_ISSUE = "~22.2"; // https://github.com/nodejs/node/issues/53075
267268

268269
export const defaultNodeConnectionHeader = () =>
269270
semver.satisfies(process.version, DEFAULT_KEEP_ALIVE)

0 commit comments

Comments
 (0)