Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 58de81f

Browse filesBrowse files
joyeecheungaddaleax
authored andcommitted
test: remove duplicate encoding tests in favor of WPT
PR-URL: #25321 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent da34c6c commit 58de81f
Copy full SHA for 58de81f
Expand file treeCollapse file tree

8 files changed

+0
-303
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-whatwg-encoding-api-basics.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-whatwg-encoding-api-basics.js
-74Lines changed: 0 additions & 74 deletions
This file was deleted.
Collapse file

‎test/parallel/test-whatwg-encoding-custom-fatal-streaming.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-whatwg-encoding-custom-fatal-streaming.js
-16Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ const common = require('../common');
88
if (!common.hasIntl)
99
common.skip('missing Intl');
1010

11-
const assert = require('assert');
12-
1311
{
1412
[
1513
{ encoding: 'utf-8', sequence: [0xC0] },
@@ -28,12 +26,6 @@ const assert = require('assert');
2826
`The encoded data was not valid for encoding ${testCase.encoding}`
2927
}
3028
);
31-
32-
// TODO(joyeecheung): remove this when WPT is ported
33-
assert.strictEqual(
34-
new TextDecoder(testCase.encoding).decode(data),
35-
'\uFFFD'
36-
);
3729
});
3830
}
3931

@@ -42,10 +34,6 @@ const assert = require('assert');
4234
const odd = new Uint8Array([0x00]);
4335
const even = new Uint8Array([0x00, 0x00]);
4436

45-
// TODO(joyeecheung): remove this when WPT is ported
46-
assert.strictEqual(decoder.decode(odd, { stream: true }), '');
47-
assert.strictEqual(decoder.decode(odd), '\u0000');
48-
4937
common.expectsError(
5038
() => {
5139
decoder.decode(even, { stream: true });
@@ -69,8 +57,4 @@ const assert = require('assert');
6957
'The encoded data was not valid for encoding utf-16le'
7058
}
7159
);
72-
73-
// TODO(joyeecheung): remove this when WPT is ported
74-
assert.strictEqual(decoder.decode(even, { stream: true }), '\u0000');
75-
assert.strictEqual(decoder.decode(even), '\u0000');
7660
}
Collapse file

‎test/parallel/test-whatwg-encoding-custom-textdecoder-fatal.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-whatwg-encoding-custom-textdecoder-fatal.js
-10Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ const common = require('../common');
88
if (!common.hasIntl)
99
common.skip('missing Intl');
1010

11-
const assert = require('assert');
12-
1311
const bad = [
1412
{ encoding: 'utf-8', input: [0xFF], name: 'invalid code' },
1513
{ encoding: 'utf-8', input: [0xC0], name: 'ends early' },
@@ -82,11 +80,3 @@ bad.forEach((t) => {
8280
}
8381
);
8482
});
85-
86-
// TODO(joyeecheung): remove this when WPT is ported
87-
{
88-
assert('fatal' in new TextDecoder());
89-
assert.strictEqual(typeof new TextDecoder().fatal, 'boolean');
90-
assert(!new TextDecoder().fatal);
91-
assert(new TextDecoder('utf-8', { fatal: true }).fatal);
92-
}
Collapse file

‎test/parallel/test-whatwg-encoding-custom-textdecoder-utf16-surrogates.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-whatwg-encoding-custom-textdecoder-utf16-surrogates.js
-7Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ const common = require('../common');
88
if (!common.hasIntl)
99
common.skip('missing Intl');
1010

11-
const assert = require('assert');
12-
1311
const bad = [
1412
{
1513
encoding: 'utf-16le',
@@ -44,11 +42,6 @@ const bad = [
4442
];
4543

4644
bad.forEach((t) => {
47-
// TODO(joyeecheung): remove this when WPT is ported
48-
assert.strictEqual(
49-
new TextDecoder(t.encoding).decode(new Uint8Array(t.input)),
50-
t.expected);
51-
5245
common.expectsError(
5346
() => {
5447
new TextDecoder(t.encoding, { fatal: true })
Collapse file

‎test/parallel/test-whatwg-encoding-surrogates-utf8.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-whatwg-encoding-surrogates-utf8.js
-53Lines changed: 0 additions & 53 deletions
This file was deleted.
Collapse file

‎test/parallel/test-whatwg-encoding-textdecoder-ignorebom.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-whatwg-encoding-textdecoder-ignorebom.js
-44Lines changed: 0 additions & 44 deletions
This file was deleted.
Collapse file

‎test/parallel/test-whatwg-encoding-textdecoder-streaming.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-whatwg-encoding-textdecoder-streaming.js
-50Lines changed: 0 additions & 50 deletions
This file was deleted.
Collapse file

‎test/parallel/test-whatwg-encoding-textencoder-utf16-surrogates.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-whatwg-encoding-textencoder-utf16-surrogates.js
-49Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.