Reorganize js/unit_tests.ts

This commit is contained in:
Ryan Dahl 2018-08-30 13:49:24 -04:00
parent b86bf4d8a4
commit 2dd9a8d028
3 changed files with 177 additions and 178 deletions

9
js/fetch_test.ts Normal file
View file

@ -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");
});