From 61273085e40fb4d992eef4b1b5601e3567c80664 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 11 Feb 2020 17:24:27 +0100 Subject: refactor: rewrite tests in std/ to use Deno.test (#3930) --- std/examples/tests/xeval_test.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'std/examples/tests') diff --git a/std/examples/tests/xeval_test.ts b/std/examples/tests/xeval_test.ts index 1c4be1f95..bfd66c097 100644 --- a/std/examples/tests/xeval_test.ts +++ b/std/examples/tests/xeval_test.ts @@ -6,16 +6,15 @@ import { assertStrContains, assert } from "../../testing/asserts.ts"; -import { test } from "../../testing/mod.ts"; const { execPath, run } = Deno; -test(async function xevalSuccess(): Promise { +Deno.test(async function xevalSuccess(): Promise { const chunks: string[] = []; await xeval(stringsReader("a\nb\nc"), ($): number => chunks.push($)); assertEquals(chunks, ["a", "b", "c"]); }); -test(async function xevalDelimiter(): Promise { +Deno.test(async function xevalDelimiter(): Promise { const chunks: string[] = []; await xeval(stringsReader("!MADMADAMADAM!"), ($): number => chunks.push($), { delimiter: "MADAM" @@ -26,7 +25,7 @@ test(async function xevalDelimiter(): Promise { // https://github.com/denoland/deno/issues/2861 const xevalPath = "examples/xeval.ts"; -test(async function xevalCliReplvar(): Promise { +Deno.test(async function xevalCliReplvar(): Promise { const p = run({ args: [execPath(), xevalPath, "--", "--replvar=abc", "console.log(abc)"], stdin: "piped", @@ -40,7 +39,7 @@ test(async function xevalCliReplvar(): Promise { assertEquals(decode(await p.output()).trimEnd(), "hello"); }); -test(async function xevalCliSyntaxError(): Promise { +Deno.test(async function xevalCliSyntaxError(): Promise { const p = run({ args: [execPath(), xevalPath, "--", "("], stdin: "null", -- cgit v1.2.3