Skip to content

Commit

Permalink
fix: add utils to spec fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
benawad committed Aug 19, 2020
1 parent 0544d61 commit 9d75c93
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 549 deletions.
558 changes: 9 additions & 549 deletions tests/__snapshots__/end-to-end.test.ts.snap

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions tests/build-graph.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ describe("build graph", () => {
"index.spec.js": ["index.js"],
"level1.js": ["level2.js"],
"level1.spec.js": ["level1.js"],
"level2.js": ["util1.js", "util2.js"],
"level2.spec.js": ["level2.js"],
});

Expand Down
2 changes: 2 additions & 0 deletions tests/detect-lonely-files.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ describe("detectLonelyFiles", () => {
"level1.spec.js": "index/level1.spec.js",
"level2.js": "index/level1/level2.js",
"level2.spec.js": "index/level1/level2.spec.js",
"util1.js": "index/level1/level2/util1.js",
"util2.js": "index/level1/level2/util2.js",
});

t("duplicates", {
Expand Down
3 changes: 3 additions & 0 deletions tests/end-to-end.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ describe("end-to-end", () => {
const testCases = fs.readdirSync(fixturePath);

for (const testCase of testCases) {
if (!testCase.includes("duplicates")) {
continue;
}
const templateFolder = path.join(fixturePath, testCase);
const copyPath = path.join(tmpPath, testCase);

Expand Down
2 changes: 2 additions & 0 deletions tests/fixtures/spec-files/level2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require('./util1')
require('./util2')
Empty file.
Empty file.
2 changes: 2 additions & 0 deletions tests/to-fractal-tree.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ const table: [string, { [key: string]: string }][] = [
"level1.spec.js": "index/level1.spec.js",
"level2.js": "index/level1/level2.js",
"level2.spec.js": "index/level1/level2.spec.js",
"util1.js": "index/level1/level2/util1.js",
"util2.js": "index/level1/level2/util2.js",
},
],
[
Expand Down

0 comments on commit 9d75c93

Please sign in to comment.