diff options
Diffstat (limited to 'js/fetch_test.ts')
-rw-r--r-- | js/fetch_test.ts | 9 |
1 files changed, 9 insertions, 0 deletions
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"); +}); |