mirror of
https://github.com/rjNemo/deno_tuto
synced 2026-06-06 02:26:40 +00:00
use deps
This commit is contained in:
parent
ff9b368f1e
commit
c46f4289a0
3 changed files with 5 additions and 2 deletions
3
deps.ts
Normal file
3
deps.ts
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
export { assert } from "https://deno.land/std@0.87.0/testing/asserts.ts";
|
||||||
|
export { readLines } from "https://deno.land/std@0.87.0/io/bufio.ts";
|
||||||
|
export { serve } from "https://deno.land/std@0.87.0/http/server.ts";
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// Run using deno test
|
// Run using deno test
|
||||||
|
|
||||||
import { assert } from "https://deno.land/std@0.87.0/testing/asserts.ts";
|
import { assert } from "../deps.ts";
|
||||||
|
|
||||||
Deno.test("Hello test", () => {
|
Deno.test("Hello test", () => {
|
||||||
assert("Hello");
|
assert("Hello");
|
||||||
|
|
|
||||||
2
index.ts
2
index.ts
|
|
@ -1,4 +1,4 @@
|
||||||
import { serve } from "https://deno.land/std@0.87.0/http/server.ts";
|
import { serve } from "./deps.ts";
|
||||||
|
|
||||||
const s = serve({ port: 8000 });
|
const s = serve({ port: 8000 });
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue