Skip to content

Commit b45be67

Browse files
joyeecheungtargos
authored andcommitted
test: rename custom encoding tests that cannot be replaced by WPT
PR-URL: #25155 Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent be42182 commit b45be67

3 files changed

+10
-0
lines changed

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

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22

33
// From: https://github.com/w3c/web-platform-tests/blob/d74324b53c/encoding/textdecoder-fatal-streaming.html
4+
// With the twist that we specifically test for Node.js error codes
45

56
const common = require('../common');
67

@@ -28,6 +29,7 @@ const assert = require('assert');
2829
}
2930
);
3031

32+
// TODO(joyeecheung): remove this when WPT is ported
3133
assert.strictEqual(
3234
new TextDecoder(testCase.encoding).decode(data),
3335
'\uFFFD'
@@ -40,6 +42,7 @@ const assert = require('assert');
4042
const odd = new Uint8Array([0x00]);
4143
const even = new Uint8Array([0x00, 0x00]);
4244

45+
// TODO(joyeecheung): remove this when WPT is ported
4346
assert.strictEqual(decoder.decode(odd, { stream: true }), '');
4447
assert.strictEqual(decoder.decode(odd), '\u0000');
4548

@@ -67,6 +70,7 @@ const assert = require('assert');
6770
}
6871
);
6972

73+
// TODO(joyeecheung): remove this when WPT is ported
7074
assert.strictEqual(decoder.decode(even, { stream: true }), '\u0000');
7175
assert.strictEqual(decoder.decode(even), '\u0000');
7276
}

test/parallel/test-whatwg-encoding-internals.js test/parallel/test-whatwg-encoding-custom-internals.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Flags: --expose-internals
22
'use strict';
33

4+
// This tests internal mapping of the Node.js encoding implementation
5+
46
require('../common');
57

68
const assert = require('assert');

test/parallel/test-whatwg-encoding-textencoder.js test/parallel/test-whatwg-encoding-custom-interop.js

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
// Flags: --expose-internals
2+
3+
// This tests interoperability between TextEncoder and TextDecoder with
4+
// Node.js util.inspect and Buffer APIs
5+
26
'use strict';
37

48
const common = require('../common');

0 commit comments

Comments
 (0)