mirror of
https://github.com/denoland/deno.git
synced 2024-11-29 16:30:56 -05:00
refactor(std/example): Inconsistencies in the example tests (#7684)
This commit is contained in:
parent
ff785bc35a
commit
04836dc700
8 changed files with 27 additions and 27 deletions
|
@ -1,8 +1,8 @@
|
|||
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
||||
import { assertStrictEquals } from "../../testing/asserts.ts";
|
||||
import { resolve, dirname, fromFileUrl } from "../../path/mod.ts";
|
||||
import { assertStrictEquals } from "../testing/asserts.ts";
|
||||
import { dirname, fromFileUrl } from "../path/mod.ts";
|
||||
|
||||
const moduleDir = resolve(dirname(fromFileUrl(import.meta.url)), "..");
|
||||
const moduleDir = dirname(fromFileUrl(import.meta.url));
|
||||
|
||||
Deno.test("[examples/cat] print multiple files", async () => {
|
||||
const decoder = new TextDecoder();
|
|
@ -1,8 +1,8 @@
|
|||
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
||||
import { assertStrictEquals } from "../../testing/asserts.ts";
|
||||
import { resolve, dirname, fromFileUrl } from "../../path/mod.ts";
|
||||
import { assertStrictEquals } from "../testing/asserts.ts";
|
||||
import { dirname, fromFileUrl } from "../path/mod.ts";
|
||||
|
||||
const moduleDir = resolve(dirname(fromFileUrl(import.meta.url)), "..");
|
||||
const moduleDir = dirname(fromFileUrl(import.meta.url));
|
||||
|
||||
Deno.test("[examples/catj] print an array", async () => {
|
||||
const decoder = new TextDecoder();
|
|
@ -1,8 +1,8 @@
|
|||
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
||||
import { assertStrictEquals } from "../../testing/asserts.ts";
|
||||
import { resolve, dirname, fromFileUrl } from "../../path/mod.ts";
|
||||
import { assertStrictEquals } from "../testing/asserts.ts";
|
||||
import { dirname, fromFileUrl } from "../path/mod.ts";
|
||||
|
||||
const moduleDir = resolve(dirname(fromFileUrl(import.meta.url)), "..");
|
||||
const moduleDir = dirname(fromFileUrl(import.meta.url));
|
||||
|
||||
Deno.test("[examples/colors] print a colored text", async () => {
|
||||
const decoder = new TextDecoder();
|
|
@ -1,9 +1,9 @@
|
|||
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
||||
import { serve } from "../../http/server.ts";
|
||||
import { assertStrictEquals } from "../../testing/asserts.ts";
|
||||
import { resolve, dirname, fromFileUrl } from "../../path/mod.ts";
|
||||
import { serve } from "../http/server.ts";
|
||||
import { assertStrictEquals } from "../testing/asserts.ts";
|
||||
import { dirname, fromFileUrl } from "../path/mod.ts";
|
||||
|
||||
const moduleDir = resolve(dirname(fromFileUrl(import.meta.url)), "..");
|
||||
const moduleDir = dirname(fromFileUrl(import.meta.url));
|
||||
|
||||
Deno.test({
|
||||
name: "[examples/curl] send a request to a specified url",
|
|
@ -1,9 +1,9 @@
|
|||
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
||||
import { assertStrictEquals, assertNotEquals } from "../../testing/asserts.ts";
|
||||
import { BufReader, ReadLineResult } from "../../io/bufio.ts";
|
||||
import { resolve, dirname, fromFileUrl } from "../../path/mod.ts";
|
||||
import { assertStrictEquals, assertNotEquals } from "../testing/asserts.ts";
|
||||
import { BufReader, ReadLineResult } from "../io/bufio.ts";
|
||||
import { dirname, fromFileUrl } from "../path/mod.ts";
|
||||
|
||||
const moduleDir = resolve(dirname(fromFileUrl(import.meta.url)), "..");
|
||||
const moduleDir = dirname(fromFileUrl(import.meta.url));
|
||||
|
||||
Deno.test("[examples/echo_server]", async () => {
|
||||
const encoder = new TextEncoder();
|
|
@ -1,2 +1,2 @@
|
|||
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
||||
import "../test.ts";
|
||||
import "./test.ts";
|
|
@ -1,8 +1,8 @@
|
|||
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
||||
import { assertStrictEquals } from "../../testing/asserts.ts";
|
||||
import { resolve, dirname, fromFileUrl } from "../../path/mod.ts";
|
||||
import { assertStrictEquals } from "../testing/asserts.ts";
|
||||
import { dirname, fromFileUrl } from "../path/mod.ts";
|
||||
|
||||
const moduleDir = resolve(dirname(fromFileUrl(import.meta.url)), "..");
|
||||
const moduleDir = dirname(fromFileUrl(import.meta.url));
|
||||
|
||||
Deno.test("[examples/welcome] print a welcome message", async () => {
|
||||
const decoder = new TextDecoder();
|
|
@ -1,15 +1,15 @@
|
|||
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
||||
import { xeval } from "../xeval.ts";
|
||||
import { StringReader } from "../../io/readers.ts";
|
||||
import { decode, encode } from "../../encoding/utf8.ts";
|
||||
import { xeval } from "./xeval.ts";
|
||||
import { StringReader } from "../io/readers.ts";
|
||||
import { decode, encode } from "../encoding/utf8.ts";
|
||||
import {
|
||||
assertEquals,
|
||||
assertStringContains,
|
||||
assert,
|
||||
} from "../../testing/asserts.ts";
|
||||
import { resolve, dirname, fromFileUrl } from "../../path/mod.ts";
|
||||
} from "../testing/asserts.ts";
|
||||
import { dirname, fromFileUrl } from "../path/mod.ts";
|
||||
|
||||
const moduleDir = resolve(dirname(fromFileUrl(import.meta.url)), "..");
|
||||
const moduleDir = dirname(fromFileUrl(import.meta.url));
|
||||
|
||||
Deno.test("xevalSuccess", async function (): Promise<void> {
|
||||
const chunks: string[] = [];
|
Loading…
Reference in a new issue