From e36edfdb3fd4709358a5f499f13cfe3d53c2b4f7 Mon Sep 17 00:00:00 2001 From: Vincent LE GOFF Date: Wed, 6 Mar 2019 22:39:50 +0100 Subject: Testing refactor (denoland/deno_std#240) Original: https://github.com/denoland/deno_std/commit/e1d5c00279132aa639030c6c6d9b4e308bd4775e --- http/file_server_test.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'http/file_server_test.ts') diff --git a/http/file_server_test.ts b/http/file_server_test.ts index cf4b8dcbd..7f2dfd278 100644 --- a/http/file_server_test.ts +++ b/http/file_server_test.ts @@ -1,7 +1,8 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. const { readFile, run } = Deno; -import { test, assert, assertEqual } from "../testing/mod.ts"; +import { test } from "../testing/mod.ts"; +import { assert, assertEq } from "../testing/asserts.ts"; import { BufReader } from "../io/bufio.ts"; import { TextProtoReader } from "../textproto/mod.ts"; @@ -35,12 +36,12 @@ test(async function serveFile() { const res = await fetch("http://localhost:4500/azure-pipelines.yml"); assert(res.headers.has("access-control-allow-origin")); assert(res.headers.has("access-control-allow-headers")); - assertEqual(res.headers.get("content-type"), "text/yaml; charset=utf-8"); + assertEq(res.headers.get("content-type"), "text/yaml; charset=utf-8"); const downloadedFile = await res.text(); const localFile = new TextDecoder().decode( await readFile("./azure-pipelines.yml") ); - assertEqual(downloadedFile, localFile); + assertEq(downloadedFile, localFile); } finally { killFileServer(); } @@ -65,7 +66,7 @@ test(async function serveFallback() { const res = await fetch("http://localhost:4500/badfile.txt"); assert(res.headers.has("access-control-allow-origin")); assert(res.headers.has("access-control-allow-headers")); - assertEqual(res.status, 404); + assertEq(res.status, 404); } finally { killFileServer(); } -- cgit v1.2.3