mirror of
https://github.com/denoland/deno.git
synced 2025-08-18 17:50:35 +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,6 +1,5 @@
|
|||
// Test ported from Golang
|
||||
// https://github.com/golang/go/blob/2cc15b1/src/encoding/csv/reader_test.go
|
||||
import { test, runIfMain } from "../testing/mod.ts";
|
||||
import { assertEquals, assert } from "../testing/asserts.ts";
|
||||
import { readMatrix, parse } from "./csv.ts";
|
||||
import { StringReader } from "../io/readers.ts";
|
||||
|
@ -450,7 +449,7 @@ x,,,
|
|||
}
|
||||
];
|
||||
for (const t of testCases) {
|
||||
test({
|
||||
Deno.test({
|
||||
name: `[CSV] ${t.Name}`,
|
||||
async fn(): Promise<void> {
|
||||
let comma = ",";
|
||||
|
@ -605,7 +604,7 @@ const parseTestCases = [
|
|||
];
|
||||
|
||||
for (const testCase of parseTestCases) {
|
||||
test({
|
||||
Deno.test({
|
||||
name: `[CSV] Parse ${testCase.name}`,
|
||||
async fn(): Promise<void> {
|
||||
const r = await parse(testCase.in, {
|
||||
|
@ -616,5 +615,3 @@ for (const testCase of parseTestCases) {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
runIfMain(import.meta);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue