From 2dd9a8d02886dcf7d988f302d890c35f8b4f7fd7 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 30 Aug 2018 13:49:24 -0400 Subject: Reorganize js/unit_tests.ts --- js/fetch_test.ts | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 js/fetch_test.ts (limited to 'js/fetch_test.ts') diff --git a/js/fetch_test.ts b/js/fetch_test.ts new file mode 100644 index 000000000..61221b2c4 --- /dev/null +++ b/js/fetch_test.ts @@ -0,0 +1,9 @@ +// Copyright 2018 the Deno authors. All rights reserved. MIT license. +import { test, testPerm, assert, assertEqual } from "./test_util.ts"; +import * as deno from "deno"; + +testPerm({ net: true }, async function fetchJsonSuccess() { + const response = await fetch("http://localhost:4545/package.json"); + const json = await response.json(); + assertEqual(json.name, "deno"); +}); -- cgit v1.2.3