summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/unit/globals_test.ts4
-rw-r--r--cli/tests/unit/performance_test.ts2
-rw-r--r--cli/tests/unit/permissions_test.ts8
3 files changed, 13 insertions, 1 deletions
diff --git a/cli/tests/unit/globals_test.ts b/cli/tests/unit/globals_test.ts
index 422bd2aec..4fd531b25 100644
--- a/cli/tests/unit/globals_test.ts
+++ b/cli/tests/unit/globals_test.ts
@@ -40,6 +40,10 @@ unitTest(function globalThisInstanceofWindow(): void {
assert(globalThis instanceof Window);
});
+unitTest(function globalThisConstructorLength(): void {
+ assert(globalThis.constructor.length === 0);
+});
+
unitTest(function globalThisInstanceofEventTarget(): void {
assert(globalThis instanceof EventTarget);
});
diff --git a/cli/tests/unit/performance_test.ts b/cli/tests/unit/performance_test.ts
index 1df46b1b2..122938b36 100644
--- a/cli/tests/unit/performance_test.ts
+++ b/cli/tests/unit/performance_test.ts
@@ -83,10 +83,12 @@ unitTest(function performanceMeasure() {
unitTest(function performanceIllegalConstructor() {
assertThrows(() => new Performance(), TypeError, "Illegal constructor.");
+ assertEquals(Performance.length, 0);
});
unitTest(function performanceEntryIllegalConstructor() {
assertThrows(() => new PerformanceEntry(), TypeError, "Illegal constructor.");
+ assertEquals(PerformanceEntry.length, 0);
});
unitTest(function performanceMeasureIllegalConstructor() {
diff --git a/cli/tests/unit/permissions_test.ts b/cli/tests/unit/permissions_test.ts
index eada8fe9a..dee8aa195 100644
--- a/cli/tests/unit/permissions_test.ts
+++ b/cli/tests/unit/permissions_test.ts
@@ -1,5 +1,10 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-import { assertThrows, assertThrowsAsync, unitTest } from "./test_util.ts";
+import {
+ assertEquals,
+ assertThrows,
+ assertThrowsAsync,
+ unitTest,
+} from "./test_util.ts";
unitTest(async function permissionInvalidName(): Promise<void> {
await assertThrowsAsync(async () => {
@@ -24,4 +29,5 @@ unitTest(function permissionStatusIllegalConstructor() {
TypeError,
"Illegal constructor.",
);
+ assertEquals(Deno.PermissionStatus.length, 0);
});