mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
refactor: rewrite tests in std/ to use Deno.test (#3930)
This commit is contained in:
parent
e0bcecee60
commit
61273085e4
94 changed files with 328 additions and 1185 deletions
|
@ -1,11 +1,10 @@
|
|||
import { test } from "../testing/mod.ts";
|
||||
import { assertEquals } from "../testing/asserts.ts";
|
||||
import * as path from "../path/mod.ts";
|
||||
import { writeFileStr, writeFileStrSync } from "./write_file_str.ts";
|
||||
|
||||
const testdataDir = path.resolve("fs", "testdata");
|
||||
|
||||
test(function testReadFileSync(): void {
|
||||
Deno.test(function testReadFileSync(): void {
|
||||
const jsonFile = path.join(testdataDir, "write_file_1.json");
|
||||
const content = "write_file_str_test";
|
||||
writeFileStrSync(jsonFile, content);
|
||||
|
@ -21,7 +20,7 @@ test(function testReadFileSync(): void {
|
|||
assertEquals(content, result);
|
||||
});
|
||||
|
||||
test(async function testReadFile(): Promise<void> {
|
||||
Deno.test(async function testReadFile(): Promise<void> {
|
||||
const jsonFile = path.join(testdataDir, "write_file_2.json");
|
||||
const content = "write_file_str_test";
|
||||
await writeFileStr(jsonFile, content);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue