Skip to content

Commit 9d75c93

Browse files
committed
fix: add utils to spec fixture
1 parent 0544d61 commit 9d75c93

File tree

8 files changed

+19
-549
lines changed

8 files changed

+19
-549
lines changed

tests/__snapshots__/end-to-end.test.ts.snap

+9-549
Large diffs are not rendered by default.

tests/build-graph.test.ts

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ describe("build graph", () => {
3131
"index.spec.js": ["index.js"],
3232
"level1.js": ["level2.js"],
3333
"level1.spec.js": ["level1.js"],
34+
"level2.js": ["util1.js", "util2.js"],
3435
"level2.spec.js": ["level2.js"],
3536
});
3637

tests/detect-lonely-files.test.ts

+2
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ describe("detectLonelyFiles", () => {
8282
"level1.spec.js": "index/level1.spec.js",
8383
"level2.js": "index/level1/level2.js",
8484
"level2.spec.js": "index/level1/level2.spec.js",
85+
"util1.js": "index/level1/level2/util1.js",
86+
"util2.js": "index/level1/level2/util2.js",
8587
});
8688

8789
t("duplicates", {

tests/end-to-end.test.ts

+3
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ describe("end-to-end", () => {
6363
const testCases = fs.readdirSync(fixturePath);
6464

6565
for (const testCase of testCases) {
66+
if (!testCase.includes("duplicates")) {
67+
continue;
68+
}
6669
const templateFolder = path.join(fixturePath, testCase);
6770
const copyPath = path.join(tmpPath, testCase);
6871

tests/fixtures/spec-files/level2.js

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
require('./util1')
2+
require('./util2')

tests/fixtures/spec-files/util1.js

Whitespace-only changes.

tests/fixtures/spec-files/util2.js

Whitespace-only changes.

tests/to-fractal-tree.test.ts

+2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ const table: [string, { [key: string]: string }][] = [
4242
"level1.spec.js": "index/level1.spec.js",
4343
"level2.js": "index/level1/level2.js",
4444
"level2.spec.js": "index/level1/level2.spec.js",
45+
"util1.js": "index/level1/level2/util1.js",
46+
"util2.js": "index/level1/level2/util2.js",
4547
},
4648
],
4749
[

0 commit comments

Comments
 (0)