From b37b286f7fa68d5656f7c180f6127bdc38cf2cf5 Mon Sep 17 00:00:00 2001 From: Ryan Clements Date: Mon, 26 Jun 2023 00:08:17 -0400 Subject: fix(ext/node): remove path.toFileUrl (#19536) --- cli/tests/node_compat/test/parallel/test-path.js | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'cli') diff --git a/cli/tests/node_compat/test/parallel/test-path.js b/cli/tests/node_compat/test/parallel/test-path.js index 03bbfebb2..657fdc951 100644 --- a/cli/tests/node_compat/test/parallel/test-path.js +++ b/cli/tests/node_compat/test/parallel/test-path.js @@ -30,6 +30,8 @@ const common = require('../common'); const assert = require('assert'); const path = require('path'); +const posix = require('path/posix'); +const win32 = require('path/win32'); // Test thrown TypeErrors const typeErrorTests = [true, false, 7, null, {}, undefined, [], NaN]; @@ -74,8 +76,15 @@ assert.strictEqual(path.win32.delimiter, ';'); // posix assert.strictEqual(path.posix.delimiter, ':'); -// TODO(wafuwafu13): Enable this -// if (common.isWindows) -// assert.strictEqual(path, path.win32); -// else -// assert.strictEqual(path, path.posix); +if (common.isWindows) + assert.strictEqual(path, path.win32); +else + assert.strictEqual(path, path.posix); + +// referential invariants +assert.strictEqual(path.posix, posix); +assert.strictEqual(path.win32, win32); +assert.strictEqual(path.posix, path.posix.posix); +assert.strictEqual(path.win32, path.posix.win32); +assert.strictEqual(path.posix, path.win32.posix); +assert.strictEqual(path.win32, path.win32.win32); -- cgit v1.2.3