From 1420c4cced4cdb3ff845e7a5988c96aaf2d740c4 Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Mon, 10 Mar 2025 20:52:03 +0800 Subject: [PATCH] f --- test/utils.test.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/utils.test.js b/test/utils.test.js index fdfe5ae..4038a6d 100644 --- a/test/utils.test.js +++ b/test/utils.test.js @@ -12,7 +12,11 @@ describe('utils.test.js', function () { it('should work with XPROFILER_PREFIX', () => { mm(process.env, 'XPROFILER_PREFIX', '/tmp'); const p = utils.getXprofilerPath(); - assert.equal(p, '/tmp/.xprofiler'); + if (os.platform() === 'win32') { + assert.equal(p, '\\tmp\\.xprofiler'); + } else { + assert.equal(p, '/tmp/.xprofiler'); + } }); it('should work default is home', () => { @@ -20,7 +24,11 @@ describe('utils.test.js', function () { return '/home/xxx'; }); const p = utils.getXprofilerPath(); - assert.equal(p, '/home/xxx/.xprofiler'); + if (os.platform() === 'win32') { + assert.equal(p, '\\home\\xxx\\.xprofiler'); + } else { + assert.equal(p, '/home/xxx/.xprofiler'); + } }); }); });