Skip to content

Commit e7449c4

Browse files
committed
Update zlib.js
1 parent ddec444 commit e7449c4

File tree

3 files changed

+20
-28
lines changed

3 files changed

+20
-28
lines changed

lib/zlib.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ ObjectSetPrototypeOf(BrotliCompress, Brotli);
848848

849849
function BrotliDecompress(opts) {
850850
if (!new.target) {
851-
return new BrotliCompress(opts);
851+
return new BrotliDecompress(opts);
852852
}
853853
ReflectApply(Brotli, this, [opts, BROTLI_DECODE]);
854854
}
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Flags: --expose-internals
2+
'use strict';
3+
4+
require('../common');
5+
6+
const { URL, parse } = require('node:url');
7+
const assert = require('node:assert');
8+
const { isURL } = require('internal/url');
9+
const { test } = require('node:test');
10+
11+
test('isURL', () => {
12+
assert.strictEqual(isURL(new URL('https://www.nodejs.org')), true);
13+
assert.strictEqual(isURL(parse('https://www.nodejs.org')), false);
14+
assert.strictEqual(isURL({
15+
href: 'https://www.nodejs.org',
16+
protocol: 'https:',
17+
path: '/',
18+
}), false);
19+
});

test/parallel/test-zlib-deflate-raw-inherits.js

-27
This file was deleted.

0 commit comments

Comments
 (0)