8000 keep old test case too · webpack/webpack@9b08be6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9b08be6

Browse files
committed
keep old test case too
1 parent 8f2c266 commit 9b08be6

File tree

13 files changed

+82
-49
lines changed

13 files changed

+82
-49
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"./a.json"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"./b.json"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"./a.json"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"./b.json"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"./a.json"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"./c.json"
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
it("should error loadModule when a cycle with 2 modules is requested", () => {
2+
expect(require("./loader!./2/a")).toEqual([
3+
["./b.json", [
4+
["./a.json", "err: There is a circular build dependency, which makes it impossible to create this module"]
5+
]]
6+
]);
7+
});
8+
it("should error loadModule when a cycle with 3 modules is requested", () => {
9+
expect(require("./loader!./3/a")).toEqual([
10+
["./b.json", [
11+
["./c.json", [
12+
["./a.json", "err: There is a circular build dependency, which makes it impossible to create this module"]
13+
]]
14+
]]
15+
]);
16+
});
17+
it("should error loadModule when requesting itself", () => {
18+
expect(require("./loader!./1/a")).toEqual([
19+
["./a.json", "err: There is a circular build dependency, which makes it impossible to create this module"]
20+
]);
21+
});
22+
it("should not report a cycle when loadModule is used twice (https://github.com/webpack/webpack/issues/14379)", () => {
23+
expect(require("./loader!./4/a")).toEqual([
24+
["./b.json", [
25+
["./c.json", []]
26+
]],
27+
["./b.json", [
28+
["./c.json", []]
29+
]]
30+
]);
31+
});

0 commit comments

Comments
 (0)
0