diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2018-12-20 14:35:58 +0800 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2018-12-29 19:20:24 +0800 |
commit | 05ee814f08f570268547a9c0141c87de38c0f389 (patch) | |
tree | b8eef7636eec89613596b25dde516663977d4006 /test | |
parent | 2b91c2b5ee01114e8ea435cb6e8211f9bf2f2f0a (diff) | |
download | android-node-v8-05ee814f08f570268547a9c0141c87de38c0f389.tar.gz android-node-v8-05ee814f08f570268547a9c0141c87de38c0f389.tar.bz2 android-node-v8-05ee814f08f570268547a9c0141c87de38c0f389.zip |
test: rename custom encoding tests that cannot be replaced by WPT
PR-URL: https://github.com/nodejs/node/pull/25155
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/parallel/test-whatwg-encoding-custom-fatal-streaming.js (renamed from test/parallel/test-whatwg-encoding-fatal-streaming.js) | 4 | ||||
-rw-r--r-- | test/parallel/test-whatwg-encoding-custom-internals.js (renamed from test/parallel/test-whatwg-encoding-internals.js) | 2 | ||||
-rw-r--r-- | test/parallel/test-whatwg-encoding-custom-interop.js (renamed from test/parallel/test-whatwg-encoding-textencoder.js) | 4 |
3 files changed, 10 insertions, 0 deletions
diff --git a/test/parallel/test-whatwg-encoding-fatal-streaming.js b/test/parallel/test-whatwg-encoding-custom-fatal-streaming.js index ddedb48362..d119987487 100644 --- a/test/parallel/test-whatwg-encoding-fatal-streaming.js +++ b/test/parallel/test-whatwg-encoding-custom-fatal-streaming.js @@ -1,6 +1,7 @@ 'use strict'; // From: https://github.com/w3c/web-platform-tests/blob/d74324b53c/encoding/textdecoder-fatal-streaming.html +// With the twist that we specifically test for Node.js error codes const common = require('../common'); @@ -28,6 +29,7 @@ const assert = require('assert'); } ); + // TODO(joyeecheung): remove this when WPT is ported assert.strictEqual( new TextDecoder(testCase.encoding).decode(data), '\uFFFD' @@ -40,6 +42,7 @@ const assert = require('assert'); const odd = new Uint8Array([0x00]); const even = new Uint8Array([0x00, 0x00]); + // TODO(joyeecheung): remove this when WPT is ported assert.strictEqual(decoder.decode(odd, { stream: true }), ''); assert.strictEqual(decoder.decode(odd), '\u0000'); @@ -67,6 +70,7 @@ const assert = require('assert'); } ); + // TODO(joyeecheung): remove this when WPT is ported assert.strictEqual(decoder.decode(even, { stream: true }), '\u0000'); assert.strictEqual(decoder.decode(even), '\u0000'); } diff --git a/test/parallel/test-whatwg-encoding-internals.js b/test/parallel/test-whatwg-encoding-custom-internals.js index d025642365..64bf6abe0d 100644 --- a/test/parallel/test-whatwg-encoding-internals.js +++ b/test/parallel/test-whatwg-encoding-custom-internals.js @@ -1,6 +1,8 @@ // Flags: --expose-internals 'use strict'; +// This tests internal mapping of the Node.js encoding implementation + require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-whatwg-encoding-textencoder.js b/test/parallel/test-whatwg-encoding-custom-interop.js index 9022477229..0ea732a03d 100644 --- a/test/parallel/test-whatwg-encoding-textencoder.js +++ b/test/parallel/test-whatwg-encoding-custom-interop.js @@ -1,4 +1,8 @@ // Flags: --expose-internals + +// This tests interoperability between TextEncoder and TextDecoder with +// Node.js util.inspect and Buffer APIs + 'use strict'; const common = require('../common'); |