diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-04-28 12:33:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-28 12:33:09 +0200 |
commit | 8feb30e3258ed9690eb850e3ca22842b260a0403 (patch) | |
tree | 6805bfe3df675c2c7f6a379093061c6b73d8365a /std/path | |
parent | b508e845671de9351c3f51755647371d76128d29 (diff) |
BREAKING: remove overload of Deno.test() (#4951)
This commit removes overload of Deno.test() that accepted named
function.
Diffstat (limited to 'std/path')
-rw-r--r-- | std/path/basename_test.ts | 4 | ||||
-rw-r--r-- | std/path/dirname_test.ts | 4 | ||||
-rw-r--r-- | std/path/extname_test.ts | 4 | ||||
-rw-r--r-- | std/path/glob_test.ts | 4 | ||||
-rw-r--r-- | std/path/isabsolute_test.ts | 4 | ||||
-rw-r--r-- | std/path/join_test.ts | 4 | ||||
-rw-r--r-- | std/path/parse_format_test.ts | 12 | ||||
-rw-r--r-- | std/path/relative_test.ts | 4 | ||||
-rw-r--r-- | std/path/resolve_test.ts | 4 | ||||
-rw-r--r-- | std/path/zero_length_strings_test.ts | 10 |
10 files changed, 27 insertions, 27 deletions
diff --git a/std/path/basename_test.ts b/std/path/basename_test.ts index 0c933307a..8ec70eb08 100644 --- a/std/path/basename_test.ts +++ b/std/path/basename_test.ts @@ -5,7 +5,7 @@ const { test } = Deno; import { assertEquals } from "../testing/asserts.ts"; import * as path from "./mod.ts"; -test(function basename() { +test("basename", function () { assertEquals(path.basename(".js", ".js"), ""); assertEquals(path.basename(""), ""); assertEquals(path.basename("/dir/basename.ext"), "basename.ext"); @@ -50,7 +50,7 @@ test(function basename() { ); }); -test(function basenameWin32() { +test("basenameWin32", function () { assertEquals(path.win32.basename("\\dir\\basename.ext"), "basename.ext"); assertEquals(path.win32.basename("\\basename.ext"), "basename.ext"); assertEquals(path.win32.basename("basename.ext"), "basename.ext"); diff --git a/std/path/dirname_test.ts b/std/path/dirname_test.ts index 4ce80eef3..a00c8bc46 100644 --- a/std/path/dirname_test.ts +++ b/std/path/dirname_test.ts @@ -5,7 +5,7 @@ const { test } = Deno; import { assertEquals } from "../testing/asserts.ts"; import * as path from "./mod.ts"; -test(function dirname() { +test("dirname", function () { assertEquals(path.posix.dirname("/a/b/"), "/a"); assertEquals(path.posix.dirname("/a/b"), "/a"); assertEquals(path.posix.dirname("/a"), "/"); @@ -16,7 +16,7 @@ test(function dirname() { assertEquals(path.posix.dirname("foo"), "."); }); -test(function dirnameWin32() { +test("dirnameWin32", function () { assertEquals(path.win32.dirname("c:\\"), "c:\\"); assertEquals(path.win32.dirname("c:\\foo"), "c:\\"); assertEquals(path.win32.dirname("c:\\foo\\"), "c:\\"); diff --git a/std/path/extname_test.ts b/std/path/extname_test.ts index 16ca7a2f9..d5c54a6de 100644 --- a/std/path/extname_test.ts +++ b/std/path/extname_test.ts @@ -52,7 +52,7 @@ const pairs = [ ["file.//", "."], ]; -test(function extname() { +test("extname", function () { pairs.forEach(function (p) { const input = p[0]; const expected = p[1]; @@ -70,7 +70,7 @@ test(function extname() { assertEquals(path.posix.extname("file.\\\\"), ".\\\\"); }); -test(function extnameWin32() { +test("extnameWin32", function () { pairs.forEach(function (p) { const input = p[0].replace(slashRE, "\\"); const expected = p[1]; diff --git a/std/path/glob_test.ts b/std/path/glob_test.ts index 8c49adeca..1ab3d9240 100644 --- a/std/path/glob_test.ts +++ b/std/path/glob_test.ts @@ -239,10 +239,10 @@ test({ }, }); -test(function normalizeGlobGlobstar(): void { +test("normalizeGlobGlobstar", function (): void { assertEquals(normalizeGlob(`**${SEP}..`, { globstar: true }), `**${SEP}..`); }); -test(function joinGlobsGlobstar(): void { +test("joinGlobsGlobstar", function (): void { assertEquals(joinGlobs(["**", ".."], { globstar: true }), `**${SEP}..`); }); diff --git a/std/path/isabsolute_test.ts b/std/path/isabsolute_test.ts index 7db87c9cb..b1614d3de 100644 --- a/std/path/isabsolute_test.ts +++ b/std/path/isabsolute_test.ts @@ -5,14 +5,14 @@ const { test } = Deno; import { assertEquals } from "../testing/asserts.ts"; import * as path from "./mod.ts"; -test(function isAbsolute() { +test("isAbsolute", function () { assertEquals(path.posix.isAbsolute("/home/foo"), true); assertEquals(path.posix.isAbsolute("/home/foo/.."), true); assertEquals(path.posix.isAbsolute("bar/"), false); assertEquals(path.posix.isAbsolute("./baz"), false); }); -test(function isAbsoluteWin32() { +test("isAbsoluteWin32", function () { assertEquals(path.win32.isAbsolute("/"), true); assertEquals(path.win32.isAbsolute("//"), true); assertEquals(path.win32.isAbsolute("//server"), true); diff --git a/std/path/join_test.ts b/std/path/join_test.ts index d9a38fb82..6e70eba5b 100644 --- a/std/path/join_test.ts +++ b/std/path/join_test.ts @@ -106,7 +106,7 @@ const windowsJoinTests = [ [["c:", "file"], "c:\\file"], ]; -test(function join() { +test("join", function () { joinTests.forEach(function (p) { const _p = p[0] as string[]; const actual = path.posix.join.apply(null, _p); @@ -114,7 +114,7 @@ test(function join() { }); }); -test(function joinWin32() { +test("joinWin32", function () { joinTests.forEach(function (p) { const _p = p[0] as string[]; const actual = path.win32.join.apply(null, _p).replace(backslashRE, "/"); diff --git a/std/path/parse_format_test.ts b/std/path/parse_format_test.ts index 60be3c9a1..2bd510551 100644 --- a/std/path/parse_format_test.ts +++ b/std/path/parse_format_test.ts @@ -113,20 +113,20 @@ function checkFormat(path: any, testCases: unknown[][]): void { }); } -test(function parseWin32() { +test("parseWin32", function () { checkParseFormat(path.win32, winPaths); checkSpecialCaseParseFormat(path.win32, winSpecialCaseParseTests); }); -test(function parse() { +test("parse", function () { checkParseFormat(path.posix, unixPaths); }); -test(function formatWin32() { +test("formatWin32", function () { checkFormat(path.win32, winSpecialCaseFormatTests); }); -test(function format() { +test("format", function () { checkFormat(path.posix, unixSpecialCaseFormatTests); }); @@ -162,7 +162,7 @@ const posixTrailingTests = [ ], ]; -test(function parseTrailingWin32() { +test("parseTrailingWin32", function () { windowsTrailingTests.forEach(function (p) { const actual = path.win32.parse(p[0] as string); const expected = p[1]; @@ -170,7 +170,7 @@ test(function parseTrailingWin32() { }); }); -test(function parseTrailing() { +test("parseTrailing", function () { posixTrailingTests.forEach(function (p) { const actual = path.posix.parse(p[0] as string); const expected = p[1]; diff --git a/std/path/relative_test.ts b/std/path/relative_test.ts index af5896236..18b6930e8 100644 --- a/std/path/relative_test.ts +++ b/std/path/relative_test.ts @@ -50,7 +50,7 @@ const relativeTests = { ], }; -test(function relative() { +test("relative", function () { relativeTests.posix.forEach(function (p) { const expected = p[2]; const actual = path.posix.relative(p[0], p[1]); @@ -58,7 +58,7 @@ test(function relative() { }); }); -test(function relativeWin32() { +test("relativeWin32", function () { relativeTests.win32.forEach(function (p) { const expected = p[2]; const actual = path.win32.relative(p[0], p[1]); diff --git a/std/path/resolve_test.ts b/std/path/resolve_test.ts index 95aa84cce..36a537b7a 100644 --- a/std/path/resolve_test.ts +++ b/std/path/resolve_test.ts @@ -34,7 +34,7 @@ const posixTests = [["/foo/tmp.3/", "../tmp.3/cycles/root.js"], "/foo/tmp.3/cycles/root.js"], ]; -test(function resolve() { +test("resolve", function () { posixTests.forEach(function (p) { const _p = p[0] as string[]; const actual = path.posix.resolve.apply(null, _p); @@ -42,7 +42,7 @@ test(function resolve() { }); }); -test(function resolveWin32() { +test("resolveWin32", function () { windowsTests.forEach(function (p) { const _p = p[0] as string[]; const actual = path.win32.resolve.apply(null, _p); diff --git a/std/path/zero_length_strings_test.ts b/std/path/zero_length_strings_test.ts index 128ba242d..771395a8c 100644 --- a/std/path/zero_length_strings_test.ts +++ b/std/path/zero_length_strings_test.ts @@ -7,7 +7,7 @@ import * as path from "./mod.ts"; const pwd = cwd(); -test(function joinZeroLength() { +test("joinZeroLength", function () { // join will internally ignore all the zero-length strings and it will return // '.' if the joined string is a zero-length string. assertEquals(path.posix.join(""), "."); @@ -18,28 +18,28 @@ test(function joinZeroLength() { assertEquals(path.join(pwd, ""), pwd); }); -test(function normalizeZeroLength() { +test("normalizeZeroLength", function () { // normalize will return '.' if the input is a zero-length string assertEquals(path.posix.normalize(""), "."); if (path.win32) assertEquals(path.win32.normalize(""), "."); assertEquals(path.normalize(pwd), pwd); }); -test(function isAbsoluteZeroLength() { +test("isAbsoluteZeroLength", function () { // Since '' is not a valid path in any of the common environments, // return false assertEquals(path.posix.isAbsolute(""), false); if (path.win32) assertEquals(path.win32.isAbsolute(""), false); }); -test(function resolveZeroLength() { +test("resolveZeroLength", function () { // resolve, internally ignores all the zero-length strings and returns the // current working directory assertEquals(path.resolve(""), pwd); assertEquals(path.resolve("", ""), pwd); }); -test(function relativeZeroLength() { +test("relativeZeroLength", function () { // relative, internally calls resolve. So, '' is actually the current // directory assertEquals(path.relative("", pwd), ""); |