From 868e8d88662ad5691212afc733e83f5de1c0979d Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 15 Aug 2018 20:57:36 -0400 Subject: First pass at fetch() With help from Thomas Ghysels --- tests/fetch_deps.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/fetch_deps.ts (limited to 'tests') diff --git a/tests/fetch_deps.ts b/tests/fetch_deps.ts new file mode 100644 index 000000000..d2690e01c --- /dev/null +++ b/tests/fetch_deps.ts @@ -0,0 +1,14 @@ +// Run ./tools/http_server.py too in order for this test to run. +import { assert } from "../js/testing/util.ts"; + +// TODO Top level await https://github.com/denoland/deno/issues/471 +async function main() { + const response = await fetch("http://localhost:4545/package.json"); + const json = await response.json(); + const deps = Object.keys(json.devDependencies); + console.log("Deno JS Deps"); + console.log(deps.map(d => `* ${d}`).join("\n")); + assert(deps.includes("typescript")); +} + +main(); -- cgit v1.2.3