diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-02-21 10:36:13 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-21 10:36:13 -0500 |
commit | dd8a10948195f231a6a9eb652e3f208813904ad6 (patch) | |
tree | f9a4afeb67bbead882c29c2458a5f1f99e2e42db /cli/js/buffer_test.ts | |
parent | d9efb8c02a0036d755c35e8e9c88d58bd45a9e2b (diff) |
refactor: remove unneeded ErrorKinds (#3936)
Diffstat (limited to 'cli/js/buffer_test.ts')
-rw-r--r-- | cli/js/buffer_test.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/js/buffer_test.ts b/cli/js/buffer_test.ts index 72c0cab4b..769b46521 100644 --- a/cli/js/buffer_test.ts +++ b/cli/js/buffer_test.ts @@ -3,7 +3,7 @@ // This code has been ported almost directly from Go's src/bytes/buffer_test.go // Copyright 2009 The Go Authors. All rights reserved. BSD license. // https://github.com/golang/go/blob/master/LICENSE -import { assert, assertEquals, test } from "./test_util.ts"; +import { assertEquals, assert, assertStrContains, test } from "./test_util.ts"; const { Buffer, readAll, readAllSync, writeAll, writeAllSync } = Deno; type Buffer = Deno.Buffer; @@ -159,8 +159,8 @@ test(async function bufferTooLargeByteWrites(): Promise<void> { err = e; } - assertEquals(err.kind, Deno.ErrorKind.TooLarge); - assertEquals(err.name, "TooLarge"); + assert(err instanceof Error); + assertStrContains(err.message, "grown beyond the maximum size"); }); test(async function bufferLargeByteReads(): Promise<void> { |