summaryrefslogtreecommitdiff
path: root/js/text_encoding_test.ts
diff options
context:
space:
mode:
author迷渡 <justjavac@gmail.com>2019-04-02 01:05:19 +0800
committerRyan Dahl <ry@tinyclouds.org>2019-04-01 13:05:19 -0400
commit659acadf77fdbeef8579a37839a464feb408437a (patch)
treeff0cae37151744de8777909d425fee05e3f24d7d /js/text_encoding_test.ts
parentada5ffa610d2b5400b612917b35d91b98bee2309 (diff)
Improve new TextDecoder().toString() (#2032)
Diffstat (limited to 'js/text_encoding_test.ts')
-rw-r--r--js/text_encoding_test.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/js/text_encoding_test.ts b/js/text_encoding_test.ts
index 0799b1c3e..d33537b4f 100644
--- a/js/text_encoding_test.ts
+++ b/js/text_encoding_test.ts
@@ -91,3 +91,11 @@ test(function textDecoderSharedInt32Array() {
const actual = decoder.decode(i32);
assertEquals(actual, "ABCDEFGH");
});
+
+test(function toStringShouldBeWebCompatibility() {
+ const encoder = new TextEncoder();
+ assertEquals(encoder.toString(), "[object TextEncoder]");
+
+ const decoder = new TextDecoder();
+ assertEquals(decoder.toString(), "[object TextDecoder]");
+});