summaryrefslogtreecommitdiff
path: root/std/testing/asserts.ts
diff options
context:
space:
mode:
Diffstat (limited to 'std/testing/asserts.ts')
-rw-r--r--std/testing/asserts.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/std/testing/asserts.ts b/std/testing/asserts.ts
index f2877eb8d..d562447c8 100644
--- a/std/testing/asserts.ts
+++ b/std/testing/asserts.ts
@@ -378,3 +378,8 @@ export function unimplemented(msg?: string): never {
export function unreachable(): never {
throw new AssertionError("unreachable");
}
+
+export function assertNotEOF<T extends {}>(val: T | Deno.EOF): T {
+ assertNotEquals(val, Deno.EOF);
+ return val as T;
+}