reduce unnecessary output on tests (#4148)

This commit is contained in:
Yusuke Sakurai 2020-02-28 05:12:04 +09:00 committed by GitHub
parent fa5f3aa600
commit c65d0c63e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 187 additions and 191 deletions

View file

@ -4,7 +4,7 @@ import { assert, assertEquals } from "../testing/asserts.ts";
import * as path from "../path/mod.ts";
import { copyBytes, tempFile } from "./util.ts";
test(function testCopyBytes(): void {
test("[io/tuil] copyBytes", function(): void {
const dst = new Uint8Array(4);
dst.fill(0);
@ -38,12 +38,11 @@ test(function testCopyBytes(): void {
assertEquals(dst, Uint8Array.of(3, 4, 0, 0));
});
test(async function ioTempfile(): Promise<void> {
test("[io/util] tempfile", async function(): Promise<void> {
const f = await tempFile(".", {
prefix: "prefix-",
postfix: "-postfix"
});
console.log(f.file, f.filepath);
const base = path.basename(f.filepath);
assert(!!base.match(/^prefix-.+?-postfix$/));
await remove(f.filepath);