diff options
author | Ryan Clements <ryanclementshax@gmail.com> | 2023-06-26 00:08:17 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-26 13:08:17 +0900 |
commit | b37b286f7fa68d5656f7c180f6127bdc38cf2cf5 (patch) | |
tree | c56c80c07f96cdbdef80a01ddd605976fe39fdfb /cli/tests/node_compat/test/parallel/test-path.js | |
parent | d8293cd8bc88eef54f95e2ad11441d2b8f4b6061 (diff) |
fix(ext/node): remove path.toFileUrl (#19536)
Diffstat (limited to 'cli/tests/node_compat/test/parallel/test-path.js')
-rw-r--r-- | cli/tests/node_compat/test/parallel/test-path.js | 19 |
1 files changed, 14 insertions, 5 deletions
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); |