summaryrefslogtreecommitdiff
path: root/js/fetch_test.ts
blob: 61221b2c43af477f55e583b77fa22e474de5a5bc (plain)
1
2
3
4
5
6
7
8
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");
});