summaryrefslogtreecommitdiff
path: root/js/fetch_test.ts
blob: 873f2fbde5b4bdd209562b3af9a23521e64056b7 (plain)
1
2
3
4
5
6
7
8
9
// Copyright 2018 the Deno authors. All rights reserved. MIT license.
import { testPerm, 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");
});