GeezerVison is showing github.com — test: remove duplicate encoding tests in favor of WPT · nodejs/node@58de81f
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: test/parallel/test-whatwg-encoding-api-basics.js -74Lines changed: 0 additions & 74 deletions Collapse file 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 number | Diff line number | Diff line change |
|---|
@@ -8,8 +8,6 @@ const common = require('../common'); | 8 | 8 | if (!common.hasIntl) | 9 | 9 | common.skip('missing Intl'); | 10 | 10 |
| 11 | | -const assert = require('assert'); | 12 | | - | 13 | 11 | { | 14 | 12 | [ | 15 | 13 | { encoding: 'utf-8', sequence: [0xC0] }, | @@ -28,12 +26,6 @@ const assert = require('assert'); | 28 | 26 | `The encoded data was not valid for encoding ${testCase.encoding}` | 29 | 27 | } | 30 | 28 | ); | 31 | | - | 32 | | - // TODO(joyeecheung): remove this when WPT is ported | 33 | | - assert.strictEqual( | 34 | | - new TextDecoder(testCase.encoding).decode(data), | 35 | | - '\uFFFD' | 36 | | - ); | 37 | 29 | }); | 38 | 30 | } | 39 | 31 |
| @@ -42,10 +34,6 @@ const assert = require('assert'); | 42 | 34 | const odd = new Uint8Array([0x00]); | 43 | 35 | const even = new Uint8Array([0x00, 0x00]); | 44 | 36 |
| 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 | | - | 49 | 37 | common.expectsError( | 50 | 38 | () => { | 51 | 39 | decoder.decode(even, { stream: true }); | @@ -69,8 +57,4 @@ const assert = require('assert'); | 69 | 57 | 'The encoded data was not valid for encoding utf-16le' | 70 | 58 | } | 71 | 59 | ); | 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'); | 76 | 60 | } |
Collapse file 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 number | Diff line number | Diff line change |
|---|
@@ -8,8 +8,6 @@ const common = require('../common'); | 8 | 8 | if (!common.hasIntl) | 9 | 9 | common.skip('missing Intl'); | 10 | 10 |
| 11 | | -const assert = require('assert'); | 12 | | - | 13 | 11 | const bad = [ | 14 | 12 | { encoding: 'utf-8', input: [0xFF], name: 'invalid code' }, | 15 | 13 | { encoding: 'utf-8', input: [0xC0], name: 'ends early' }, | @@ -82,11 +80,3 @@ bad.forEach((t) => { | 82 | 80 | } | 83 | 81 | ); | 84 | 82 | }); | 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 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 number | Diff line number | Diff line change |
|---|
@@ -8,8 +8,6 @@ const common = require('../common'); | 8 | 8 | if (!common.hasIntl) | 9 | 9 | common.skip('missing Intl'); | 10 | 10 |
| 11 | | -const assert = require('assert'); | 12 | | - | 13 | 11 | const bad = [ | 14 | 12 | { | 15 | 13 | encoding: 'utf-16le', | @@ -44,11 +42,6 @@ const bad = [ | 44 | 42 | ]; | 45 | 43 |
| 46 | 44 | 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 | | - | 52 | 45 | common.expectsError( | 53 | 46 | () => { | 54 | 47 | new TextDecoder(t.encoding, { fatal: true }) | |
Collapse file Copy file name to clipboardExpand all lines: test/parallel/test-whatwg-encoding-surrogates-utf8.js -53Lines changed: 0 additions & 53 deletions Collapse file Copy file name to clipboardExpand all lines: test/parallel/test-whatwg-encoding-textdecoder-ignorebom.js -44Lines changed: 0 additions & 44 deletions Collapse file Copy file name to clipboardExpand all lines: test/parallel/test-whatwg-encoding-textdecoder-streaming.js -50Lines changed: 0 additions & 50 deletions Collapse file Copy file name to clipboardExpand all lines: test/parallel/test-whatwg-encoding-textencoder-utf16-surrogates.js -49Lines changed: 0 additions & 49 deletions
|