GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: remove duplicate encoding tests in favor of WPT · nodejs/node@58de81f

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-whatwg-encoding-api-basics.js
    • test-whatwg-encoding-custom-fatal-streaming.js
    • test-whatwg-encoding-custom-textdecoder-fatal.js
    • test-whatwg-encoding-custom-textdecoder-utf16-surrogates.js
    • test-whatwg-encoding-surrogates-utf8.js
    • test-whatwg-encoding-textdecoder-ignorebom.js
    • test-whatwg-encoding-textdecoder-streaming.js
    • test-whatwg-encoding-textencoder-utf16-surrogates.js
Expand file treeCollapse file tree
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)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.