Skip to content

Commit

Permalink
Fix test case using unsupported option for Node 8
Browse files Browse the repository at this point in the history
The `fs.mkdir` function does not take an `options` object until Node 10
  • Loading branch information
zqianem committed Aug 19, 2022
1 parent 62b19c9 commit 66ed188
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2058,16 +2058,19 @@ 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([]);
const events = [];

// 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}`);
Expand Down

0 comments on commit 66ed188

Please sign in to comment.