1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-26 16:09:27 -05:00

refactor(std/example): Inconsistencies in the example tests (#7684)

This commit is contained in:
tokiedokie 2020-09-27 00:54:26 +09:00 committed by GitHub
parent ff785bc35a
commit 04836dc700
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 27 additions and 27 deletions

View file

@ -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();

View file

@ -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();

View file

@ -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();

View file

@ -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",

View file

@ -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();

View file

@ -1,2 +1,2 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import "../test.ts";
import "./test.ts";

View file

@ -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();

View file

@ -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[] = [];