From ed3522814f55f68a8ef38f5a792000d5ef187672 Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Sun, 26 Sep 2021 07:52:32 +0200 Subject: [PATCH] Try to fix Windows test --- test/function/index.js | 4 ++-- test/utils.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/function/index.js b/test/function/index.js index 8ad691751bf..2651c87f226 100644 --- a/test/function/index.js +++ b/test/function/index.js @@ -48,7 +48,7 @@ function runCodeSplitTest(codeMap, entryId, configContext) { return { exports }; } -runTestSuiteWithSamples('function', path.resolve(__dirname, 'samples'), (dir, config) => { +runTestSuiteWithSamples('function', path.join(__dirname, 'samples'), (dir, config) => { (config.skip ? it.skip : config.solo ? it.only : it)( path.basename(dir) + ': ' + config.description, () => { @@ -59,7 +59,7 @@ runTestSuiteWithSamples('function', path.resolve(__dirname, 'samples'), (dir, co return rollup .rollup({ - input: dir + '/main.js', + input: path.join(dir, 'main.js'), onwarn: warning => warnings.push(warning), strictDeprecations: true, ...(config.options || {}) diff --git a/test/utils.js b/test/utils.js index d4969234a64..eb9eb3e91c2 100644 --- a/test/utils.js +++ b/test/utils.js @@ -123,7 +123,7 @@ function runSamples(samplesDir, runTest, onTeardown) { .readdirSync(samplesDir) .filter(name => name[0] !== '.') .sort() - .forEach(fileName => runTestsInDir(samplesDir + '/' + fileName, runTest)); + .forEach(fileName => runTestsInDir(path.join(samplesDir, +fileName), runTest)); } function runTestsInDir(dir, runTest) { @@ -138,7 +138,7 @@ function runTestsInDir(dir, runTest) { fileNames .filter(name => name[0] !== '.') .sort() - .forEach(fileName => runTestsInDir(dir + '/' + fileName, runTest)); + .forEach(fileName => runTestsInDir(path.join(dir, fileName), runTest)); }); } }