Skip to content

Commit e4cb625

Browse files
committedOct 27, 2020
tests: add fourth directory layer to make sure depth3 is not recursing too far
1 parent 08595e8 commit e4cb625

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed
 

‎test/.lib/createTestDirs.mjs

+2
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@ export const createTestDirs = id => async () => {
1414
path.join(dir, 'test', 'deep', 'test.js'),
1515
path.join(dir, 'test2', 'deep', 'test2.js'),
1616
path.join(dir, 'test2', 'deep', 'deeper', 'deep.js'),
17+
path.join(dir, 'test2', 'deep', 'deeper', 'evendeeper', 'deepest.js'),
1718
path.join(dir, 'test.js'),
1819
]
1920

2021
await fs.mkdirp(path.join(dir, 'test', 'deep'))
2122
await fs.mkdirp(path.join(dir, 'test2', 'deep'))
2223
await fs.mkdirp(path.join(dir, 'test2', 'deep', 'deeper'))
24+
await fs.mkdirp(path.join(dir, 'test2', 'deep', 'deeper', 'evendeeper'))
2325

2426
await Promise.all(files.map(async f => await fs.writeFile(f, 't')))
2527

‎test/getDirectories.mjs

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const expectedDirsRecursive = [
1616
path.join(process.cwd(), '.__test__dirs_recursive', 'test2'),
1717
path.join(process.cwd(), '.__test__dirs_recursive', 'test2', 'deep'),
1818
path.join(process.cwd(), '.__test__dirs_recursive', 'test2', 'deep', 'deeper'),
19+
path.join(process.cwd(), '.__test__dirs_recursive', 'test2', 'deep', 'deeper', 'evendeeper'),
1920
]
2021

2122
const expectedDirs = [

‎test/getFiles.mjs

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const expectedFilesRecursive = [
1515
path.join(process.cwd(), '.__test__files_recursive', 'test', 'deep', 'test.js'),
1616
path.join(process.cwd(), '.__test__files_recursive', 'test.js'),
1717
path.join(process.cwd(), '.__test__files_recursive', 'test2', 'deep', 'deeper', 'deep.js'),
18+
path.join(process.cwd(), '.__test__files_recursive', 'test2', 'deep', 'deeper', 'evendeeper', 'deepest.js'),
1819
path.join(process.cwd(), '.__test__files_recursive', 'test2', 'deep', 'test2.js'),
1920
]
2021

0 commit comments

Comments
 (0)
Please sign in to comment.