From 56508f113d9fe61ffcce4cbbb85e3d6961888e1d Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Tue, 3 Sep 2019 01:30:14 +0900 Subject: ops/fetch: add statusText (#2851) --- js/fetch_test.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'js/fetch_test.ts') diff --git a/js/fetch_test.ts b/js/fetch_test.ts index 542d69147..8d8b581d8 100644 --- a/js/fetch_test.ts +++ b/js/fetch_test.ts @@ -107,6 +107,7 @@ testPerm( testPerm({ net: true }, async function fetchWithRedirection(): Promise { const response = await fetch("http://localhost:4546/"); // will redirect to http://localhost:4545/ assertEquals(response.status, 200); + assertEquals(response.statusText, "OK"); assertEquals(response.url, "http://localhost:4545/"); const body = await response.text(); assert(body.includes("Directory listing for /")); @@ -117,6 +118,7 @@ testPerm({ net: true }, async function fetchWithRelativeRedirection(): Promise< > { const response = await fetch("http://localhost:4545/tests"); // will redirect to /tests/ assertEquals(response.status, 200); + assertEquals(response.statusText, "OK"); const body = await response.text(); assert(body.includes("Directory listing for /tests/")); }); -- cgit v1.2.3