Skip to content

Commit 492b3fc

Browse files
committed
Test UMD builds
1 parent 4df4138 commit 492b3fc

File tree

6 files changed

+42
-0
lines changed

6 files changed

+42
-0
lines changed

packages/react-router-config/jest.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ switch (process.env.TEST_ENV) {
66
case "es":
77
mappedModule = "<rootDir>/es/index";
88
break;
9+
case "umd":
10+
mappedModule = "<rootDir>/umd/react-router-config.js";
11+
break;
12+
case "min":
13+
mappedModule = "<rootDir>/umd/react-router-config.min.js";
14+
break;
915
default:
1016
mappedModule = "<rootDir>/modules/index";
1117
}

packages/react-router-config/tools/test.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,15 @@ console.log("Testing es build");
2323
exec("jest", {
2424
TEST_ENV: "es"
2525
});
26+
27+
console.log("Testing UMD build");
28+
29+
exec("jest", {
30+
TEST_ENV: "umd"
31+
});
32+
33+
console.log("Testing UMD min build");
34+
35+
exec("jest", {
36+
TEST_ENV: "min"
37+
});

packages/react-router-dom/jest.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ switch (process.env.TEST_ENV) {
66
case "es":
77
mappedModule = "<rootDir>/es/index";
88
break;
9+
case "umd":
10+
mappedModule = "<rootDir>/umd/react-router-dom.js";
11+
break;
12+
case "min":
13+
mappedModule = "<rootDir>/umd/react-router-dom.min.js";
14+
break;
915
default:
1016
mappedModule = "<rootDir>/modules/index";
1117
}

packages/react-router-dom/tools/test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,9 @@ console.log("Testing es build");
2323
exec("jest", {
2424
TEST_ENV: "es"
2525
});
26+
27+
console.log("Testing UMD build");
28+
29+
exec("jest", {
30+
TEST_ENV: "umd"
31+
});

packages/react-router/jest.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ switch (process.env.TEST_ENV) {
66
case "es":
77
mappedModule = "<rootDir>/es/index";
88
break;
9+
case "umd":
10+
mappedModule = "<rootDir>/umd/react-router.js";
11+
break;
12+
case "min":
13+
mappedModule = "<rootDir>/umd/react-router.min.js";
14+
break;
915
default:
1016
mappedModule = "<rootDir>/modules/index";
1117
}

packages/react-router/tools/test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,9 @@ console.log("Testing es build");
2323
exec("jest", {
2424
TEST_ENV: "es"
2525
});
26+
27+
console.log("Testing UMD build");
28+
29+
exec("jest", {
30+
TEST_ENV: "umd"
31+
});

0 commit comments

Comments
 (0)