mirror of
https://github.com/denoland/deno.git
synced 2025-10-02 23:24:37 +00:00
refactor: Don't destructure the Deno namespace (#6268)
This commit is contained in:
parent
26bf56afda
commit
1fff6f55c3
111 changed files with 1632 additions and 1695 deletions
|
@ -1,12 +1,10 @@
|
|||
// Copyright the Browserify authors. MIT License.
|
||||
// Ported from https://github.com/browserify/path-browserify/
|
||||
|
||||
// TODO(kt3k): fix any types in this file
|
||||
|
||||
const { test } = Deno;
|
||||
import { assertEquals } from "../testing/asserts.ts";
|
||||
import * as path from "./mod.ts";
|
||||
|
||||
// TODO(kt3k): fix any types in this file
|
||||
|
||||
const winPaths = [
|
||||
// [path, root]
|
||||
["C:\\path\\dir\\index.html", "C:\\"],
|
||||
|
@ -116,20 +114,20 @@ function checkFormat(path: any, testCases: unknown[][]): void {
|
|||
});
|
||||
}
|
||||
|
||||
test("parseWin32", function () {
|
||||
Deno.test("parseWin32", function () {
|
||||
checkParseFormat(path.win32, winPaths);
|
||||
checkSpecialCaseParseFormat(path.win32, winSpecialCaseParseTests);
|
||||
});
|
||||
|
||||
test("parse", function () {
|
||||
Deno.test("parse", function () {
|
||||
checkParseFormat(path.posix, unixPaths);
|
||||
});
|
||||
|
||||
test("formatWin32", function () {
|
||||
Deno.test("formatWin32", function () {
|
||||
checkFormat(path.win32, winSpecialCaseFormatTests);
|
||||
});
|
||||
|
||||
test("format", function () {
|
||||
Deno.test("format", function () {
|
||||
checkFormat(path.posix, unixSpecialCaseFormatTests);
|
||||
});
|
||||
|
||||
|
@ -165,7 +163,7 @@ const posixTrailingTests = [
|
|||
],
|
||||
];
|
||||
|
||||
test("parseTrailingWin32", function () {
|
||||
Deno.test("parseTrailingWin32", function () {
|
||||
windowsTrailingTests.forEach(function (p) {
|
||||
const actual = path.win32.parse(p[0] as string);
|
||||
const expected = p[1];
|
||||
|
@ -173,7 +171,7 @@ test("parseTrailingWin32", function () {
|
|||
});
|
||||
});
|
||||
|
||||
test("parseTrailing", function () {
|
||||
Deno.test("parseTrailing", function () {
|
||||
posixTrailingTests.forEach(function (p) {
|
||||
const actual = path.posix.parse(p[0] as string);
|
||||
const expected = p[1];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue