From 43131875fea5c0479eaa6d5c78a20a136180d036 Mon Sep 17 00:00:00 2001 From: RafaelGSS Date: Wed, 27 Mar 2024 19:41:17 -0300 Subject: [PATCH] fixup! benchmark: add toNamespacedPath bench --- benchmark/path/toNamespacedPath-posix.js | 4 ++-- benchmark/path/toNamespacedPath-win32.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/benchmark/path/toNamespacedPath-posix.js b/benchmark/path/toNamespacedPath-posix.js index 519f32993144c9..dbef737dc8ee84 100644 --- a/benchmark/path/toNamespacedPath-posix.js +++ b/benchmark/path/toNamespacedPath-posix.js @@ -9,7 +9,7 @@ const bench = common.createBenchmark(main, { '.', '/tmp/bar', '/home/node/..', - __dirname + '/..', + posix.join(__dirname, '/..'), 'bar/baz', ], n: [1e5], @@ -22,5 +22,5 @@ function main({ n, path }) { a = posix.toNamespacedPath(path); } bench.end(n); - assert.ok(a + 'a') + assert.ok(a + 'a'); } diff --git a/benchmark/path/toNamespacedPath-win32.js b/benchmark/path/toNamespacedPath-win32.js index f191ef6d445555..7cb38bf63aebf0 100644 --- a/benchmark/path/toNamespacedPath-win32.js +++ b/benchmark/path/toNamespacedPath-win32.js @@ -12,7 +12,7 @@ const bench = common.createBenchmark(main, { 'c:/blah\\blah', 'd:/games', 'c:../a', - __dirname + '/..', + win32.join(__dirname, '/..'), ], n: [1e5], }); @@ -24,5 +24,5 @@ function main({ n, path }) { a = win32.toNamespacedPath(path); } bench.end(n); - assert.ok(a + 'a') + assert.ok(a + 'a'); }