diff options
| author | Vincent LE GOFF <g_n_s@hotmail.fr> | 2019-03-06 22:39:50 +0100 |
|---|---|---|
| committer | Ryan Dahl <ry@tinyclouds.org> | 2019-03-06 16:39:50 -0500 |
| commit | e36edfdb3fd4709358a5f499f13cfe3d53c2b4f7 (patch) | |
| tree | 1baef3f876a5e75288c3ec9056cdb93dd6b5787f /fs/path/parse_format_test.ts | |
| parent | d29957ad17956016c35a04f5f1f98565e58e8a2e (diff) | |
Testing refactor (denoland/deno_std#240)
Original: https://github.com/denoland/deno_std/commit/e1d5c00279132aa639030c6c6d9b4e308bd4775e
Diffstat (limited to 'fs/path/parse_format_test.ts')
| -rw-r--r-- | fs/path/parse_format_test.ts | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/fs/path/parse_format_test.ts b/fs/path/parse_format_test.ts index 8b429ce24..3bf3c462b 100644 --- a/fs/path/parse_format_test.ts +++ b/fs/path/parse_format_test.ts @@ -1,7 +1,8 @@ // Copyright the Browserify authors. MIT License. // Ported from https://github.com/browserify/path-browserify/ -import { test, assertEqual } from "../../testing/mod.ts"; +import { test } from "../../testing/mod.ts"; +import { assertEq } from "../../testing/asserts.ts"; import * as path from "./mod.ts"; const winPaths = [ @@ -130,15 +131,15 @@ function checkParseFormat(path, paths) { paths.forEach(function(p) { const element = p[0]; const output = path.parse(element); - assertEqual(typeof output.root, "string"); - assertEqual(typeof output.dir, "string"); - assertEqual(typeof output.base, "string"); - assertEqual(typeof output.ext, "string"); - assertEqual(typeof output.name, "string"); - assertEqual(path.format(output), element); - assertEqual(output.rooroot, undefined); - assertEqual(output.dir, output.dir ? path.dirname(element) : ""); - assertEqual(output.base, path.basename(element)); + assertEq(typeof output.root, "string"); + assertEq(typeof output.dir, "string"); + assertEq(typeof output.base, "string"); + assertEq(typeof output.ext, "string"); + assertEq(typeof output.name, "string"); + assertEq(path.format(output), element); + assertEq(output.rooroot, undefined); + assertEq(output.dir, output.dir ? path.dirname(element) : ""); + assertEq(output.base, path.basename(element)); }); } @@ -148,14 +149,14 @@ function checkSpecialCaseParseFormat(path, testCases) { const expect = testCase[1]; const output = path.parse(element); Object.keys(expect).forEach(function(key) { - assertEqual(output[key], expect[key]); + assertEq(output[key], expect[key]); }); }); } function checkFormat(path, testCases) { testCases.forEach(function(testCase) { - assertEqual(path.format(testCase[0]), testCase[1]); + assertEq(path.format(testCase[0]), testCase[1]); }); } @@ -163,7 +164,7 @@ test(function parseTrailingWin32() { windowsTrailingTests.forEach(function(p) { const actual = path.win32.parse(p[0] as string); const expected = p[1]; - assertEqual(actual, expected); + assertEq(actual, expected); }); }); @@ -171,6 +172,6 @@ test(function parseTrailing() { posixTrailingTests.forEach(function(p) { const actual = path.posix.parse(p[0] as string); const expected = p[1]; - assertEqual(actual, expected); + assertEq(actual, expected); }); }); |
