summaryrefslogtreecommitdiff
path: root/cli/js/event_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/js/event_test.ts')
-rw-r--r--cli/js/event_test.ts13
1 files changed, 7 insertions, 6 deletions
diff --git a/cli/js/event_test.ts b/cli/js/event_test.ts
index affd979ee..2ff23daf9 100644
--- a/cli/js/event_test.ts
+++ b/cli/js/event_test.ts
@@ -1,5 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-import { test, assertEquals, assertNotEquals } from "./test_util.ts";
+import { test, assertEquals, assert } from "./test_util.ts";
test(function eventInitializedWithType(): void {
const type = "click";
@@ -70,7 +70,8 @@ test(function eventPreventDefaultSuccess(): void {
});
test(function eventInitializedWithNonStringType(): void {
- const type = undefined;
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ const type: any = undefined;
const event = new Event(type);
assertEquals(event.isTrusted, false);
@@ -84,12 +85,12 @@ test(function eventInitializedWithNonStringType(): void {
// ref https://github.com/web-platform-tests/wpt/blob/master/dom/events/Event-isTrusted.any.js
test(function eventIsTrusted(): void {
const desc1 = Object.getOwnPropertyDescriptor(new Event("x"), "isTrusted");
- assertNotEquals(desc1, undefined);
+ assert(desc1);
assertEquals(typeof desc1.get, "function");
const desc2 = Object.getOwnPropertyDescriptor(new Event("x"), "isTrusted");
- assertNotEquals(desc2, undefined);
- assertEquals(typeof desc2.get, "function");
+ assert(desc2);
+ assertEquals(typeof desc2!.get, "function");
- assertEquals(desc1.get, desc2.get);
+ assertEquals(desc1!.get, desc2!.get);
});