mirror of
https://github.com/denoland/deno.git
synced 2025-10-03 15:44:36 +00:00
website: update http example (#2367)
This commit is contained in:
parent
22feb74ba1
commit
0e89ca7b70
2 changed files with 3 additions and 3 deletions
|
@ -108,7 +108,7 @@ href="https://github.com/denoland/deno_install/blob/master/install.ps1">https://
|
||||||
|
|
||||||
<p>Or a more complex one:</p>
|
<p>Or a more complex one:</p>
|
||||||
|
|
||||||
<pre><code class="typescript language-typescript">import { serve } from "https://deno.land/std@v0.3.2/http/server.ts";
|
<pre><code class="typescript language-typescript">import { serve } from "https://deno.land/std@v0.5/http/server.ts";
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
const body = new TextEncoder().encode("Hello World\n");
|
const body = new TextEncoder().encode("Hello World\n");
|
||||||
|
|
|
@ -289,8 +289,8 @@ test myTestFunction ... ok
|
||||||
Example of test:
|
Example of test:
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
import { assertEquals } from "https://deno.land/std@v0.3.1/testing/asserts.ts";
|
import { assertEquals } from "https://deno.land/std@v0.5/testing/asserts.ts";
|
||||||
import { test } from "https://deno.land/std@v0.3.1/testing/mod.ts";
|
import { test } from "https://deno.land/std@v0.5/testing/mod.ts";
|
||||||
import { foo } from "./mod.ts";
|
import { foo } from "./mod.ts";
|
||||||
|
|
||||||
test(function myTestFunction() {
|
test(function myTestFunction() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue