diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2018-08-30 13:49:24 -0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-08-30 14:41:55 -0400 |
commit | 2dd9a8d02886dcf7d988f302d890c35f8b4f7fd7 (patch) | |
tree | 3cd08f9f0785d2da26f5f15dde8dd10bb461d9d3 /js/fetch_test.ts | |
parent | b86bf4d8a4d19f8ba50615028d711413307487e9 (diff) |
Reorganize js/unit_tests.ts
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"); +}); |