summaryrefslogtreecommitdiff
path: root/std/examples/tests/xeval_test.ts
diff options
context:
space:
mode:
authorYusuke Sakurai <kerokerokerop@gmail.com>2020-02-07 16:23:38 +0900
committerGitHub <noreply@github.com>2020-02-07 02:23:38 -0500
commitc2986891f6aac87cec98232735945af756e6643f (patch)
tree716dc739f438bf740fa960b87fc022d569090802 /std/examples/tests/xeval_test.ts
parentea6179f7dce89416f1586ee18c2f437e68eabd38 (diff)
remove non-null assertion operator from std (part1) (#3900)
Diffstat (limited to 'std/examples/tests/xeval_test.ts')
-rw-r--r--std/examples/tests/xeval_test.ts11
1 files changed, 8 insertions, 3 deletions
diff --git a/std/examples/tests/xeval_test.ts b/std/examples/tests/xeval_test.ts
index db9cbceee..1c4be1f95 100644
--- a/std/examples/tests/xeval_test.ts
+++ b/std/examples/tests/xeval_test.ts
@@ -1,7 +1,11 @@
import { xeval } from "../xeval.ts";
import { stringsReader } from "../../io/util.ts";
import { decode, encode } from "../../strings/mod.ts";
-import { assertEquals, assertStrContains } from "../../testing/asserts.ts";
+import {
+ assertEquals,
+ assertStrContains,
+ assert
+} from "../../testing/asserts.ts";
import { test } from "../../testing/mod.ts";
const { execPath, run } = Deno;
@@ -29,8 +33,9 @@ test(async function xevalCliReplvar(): Promise<void> {
stdout: "piped",
stderr: "null"
});
- await p.stdin!.write(encode("hello"));
- await p.stdin!.close();
+ assert(p.stdin != null);
+ await p.stdin.write(encode("hello"));
+ await p.stdin.close();
assertEquals(await p.status(), { code: 0, success: true });
assertEquals(decode(await p.output()).trimEnd(), "hello");
});