summaryrefslogtreecommitdiff
path: root/js/custom_event_test.ts
diff options
context:
space:
mode:
author迷渡 <justjavac@gmail.com>2019-04-03 20:41:05 +0800
committerRyan Dahl <ry@tinyclouds.org>2019-04-03 08:41:05 -0400
commitbb617d24781d7c1e67e8e825cc07faba9a5df075 (patch)
treef219c5e5cd2e930c18d6ef0870b29af900bd8e4a /js/custom_event_test.ts
parent5f97c041d9115c480e3b9f428cfee27b109b3883 (diff)
fix toString for some web objects (#2040)
Diffstat (limited to 'js/custom_event_test.ts')
-rw-r--r--js/custom_event_test.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/js/custom_event_test.ts b/js/custom_event_test.ts
index 20c901303..2f8f5c1a0 100644
--- a/js/custom_event_test.ts
+++ b/js/custom_event_test.ts
@@ -19,3 +19,9 @@ test(function customEventInitializedWithDetail() {
assertEquals(event.target, null);
assertEquals(event.type, type);
});
+
+test(function toStringShouldBeWebCompatibility() {
+ const type = "touchstart";
+ const event = new CustomEvent(type, {});
+ assertEquals(event.toString(), "[object CustomEvent]");
+});