From 66ed188b34bd27c7fcba99b3d4d296cebedc856e Mon Sep 17 00:00:00 2001 From: Em Zhan Date: Fri, 19 Aug 2022 13:50:41 -0500 Subject: [PATCH] Fix test case using unsupported option for Node 8 The `fs.mkdir` function does not take an `options` object until Node 10 --- test.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test.js b/test.js index b7445a35..3e91d8f1 100644 --- a/test.js +++ b/test.js @@ -2058,7 +2058,10 @@ const runTests = (baseopts) => { const fixturesPathRel = sysPath.join(FIXTURES_PATH_REL, id, 'test-case-1040'); const linkPath = sysPath.join(fixturesPathRel, 'symlinkFolder'); - await fs_mkdir(sysPath.resolve(linkPath), { recursive: true }); + const packagesPath = sysPath.join(fixturesPathRel, 'packages'); + await fs_mkdir(fixturesPathRel); + await fs_mkdir(linkPath); + await fs_mkdir(packagesPath); // Init chokidar const watcher = chokidar.watch([]); @@ -2066,8 +2069,8 @@ const runTests = (baseopts) => { // Add more than 10 folders to cap consolidateThreshhold for (let i = 0 ; i < 20 ; i += 1) { - const folderPath = sysPath.join(fixturesPathRel, 'packages', `folder${i}`); - await fs_mkdir(sysPath.resolve(folderPath), { recursive: true }); + const folderPath = sysPath.join(packagesPath, `folder${i}`); + await fs_mkdir(folderPath); const filePath = sysPath.join(folderPath, `file${i}.js`); await write(sysPath.resolve(filePath), 'file content'); const symlinkPath = sysPath.join(linkPath, `folder${i}`);