Skip to content

Commit ad62940

Browse files
test: update
1 parent 96b2e91 commit ad62940

File tree

2 files changed

+108
-106
lines changed

2 files changed

+108
-106
lines changed

test/__snapshots__/modules-option.test.js.snap

+101-101
Original file line numberDiff line numberDiff line change
@@ -13672,66 +13672,9 @@ Array [
1367213672

1367313673
exports[`"modules" option show work when the "modules" option is "icss", case "multiple-keys-values-in-export": warnings 1`] = `Array []`;
1367413674

13675-
exports[`"modules" option show work with the "compileType" and "exportOnlyLocals" options: errors 1`] = `Array []`;
13675+
exports[`"modules" option show work with the "mode" option using the "local" value: errors 1`] = `Array []`;
1367613676

13677-
exports[`"modules" option show work with the "compileType" and "exportOnlyLocals" options: module 1`] = `
13678-
"// Imports
13679-
import ___CSS_LOADER_ICSS_IMPORT_0___ from \\"-!../../../../../../src/index.js??ruleSet[1].rules[0].use[0]!./vars.css\\";
13680-
// Exports
13681-
export default {
13682-
\\"primary-color\\": \\"\\" + ___CSS_LOADER_ICSS_IMPORT_0___[\\"primary-color\\"] + \\"\\"
13683-
};
13684-
"
13685-
`;
13686-
13687-
exports[`"modules" option show work with the "compileType" and "exportOnlyLocals" options: result 1`] = `
13688-
Object {
13689-
"primary-color": "red",
13690-
}
13691-
`;
13692-
13693-
exports[`"modules" option show work with the "compileType" and "exportOnlyLocals" options: warnings 1`] = `Array []`;
13694-
13695-
exports[`"modules" option show work with the "compileType" and "namedExport" options: errors 1`] = `Array []`;
13696-
13697-
exports[`"modules" option show work with the "compileType" and "namedExport" options: module 1`] = `
13698-
"// Imports
13699-
import ___CSS_LOADER_API_IMPORT___ from \\"../../../../../../src/runtime/api.js\\";
13700-
import ___CSS_LOADER_ICSS_IMPORT_0___, * as ___CSS_LOADER_ICSS_IMPORT_0____NAMED___ from \\"-!../../../../../../src/index.js??ruleSet[1].rules[0].use[0]!./vars.css\\";
13701-
var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(function(i){return i[1]});
13702-
___CSS_LOADER_EXPORT___.i(___CSS_LOADER_ICSS_IMPORT_0___, \\"\\", true);
13703-
// Module
13704-
___CSS_LOADER_EXPORT___.push([module.id, \\".className {\\\\n color: \\" + ___CSS_LOADER_ICSS_IMPORT_0____NAMED___[\\"primaryColor\\"] + \\";\\\\n}\\\\n\\", \\"\\"]);
13705-
// Exports
13706-
export const primaryColor = \\"\\" + ___CSS_LOADER_ICSS_IMPORT_0____NAMED___[\\"primaryColor\\"] + \\"\\";
13707-
export default ___CSS_LOADER_EXPORT___;
13708-
"
13709-
`;
13710-
13711-
exports[`"modules" option show work with the "compileType" and "namedExport" options: result 1`] = `
13712-
Array [
13713-
Array [
13714-
"../../src/index.js??ruleSet[1].rules[0].use[0]!./modules/icss/tests-cases/import/vars.css",
13715-
"
13716-
",
13717-
"",
13718-
],
13719-
Array [
13720-
"./modules/icss/tests-cases/import/source.css",
13721-
".className {
13722-
color: red;
13723-
}
13724-
",
13725-
"",
13726-
],
13727-
]
13728-
`;
13729-
13730-
exports[`"modules" option show work with the "compileType" and "namedExport" options: warnings 1`] = `Array []`;
13731-
13732-
exports[`"modules" option show work with the "compileType" option using the "module" value: errors 1`] = `Array []`;
13733-
13734-
exports[`"modules" option show work with the "compileType" option using the "module" value: module 1`] = `
13677+
exports[`"modules" option show work with the "mode" option using the "local" value: module 1`] = `
1373513678
"// Imports
1373613679
import ___CSS_LOADER_API_IMPORT___ from \\"../../../../src/runtime/api.js\\";
1373713680
import ___CSS_LOADER_ICSS_IMPORT_0___ from \\"-!../../../../src/index.js??ruleSet[1].rules[0].use[0]!./values.css\\";
@@ -13812,7 +13755,7 @@ export default ___CSS_LOADER_EXPORT___;
1381213755
"
1381313756
`;
1381413757

13815-
exports[`"modules" option show work with the "compileType" option using the "module" value: result 1`] = `
13758+
exports[`"modules" option show work with the "mode" option using the "local" value: result 1`] = `
1381613759
Array [
1381713760
Array [
1381813761
"../../src/index.js??ruleSet[1].rules[0].use[0]!./modules/composes/test-other.css",
@@ -14008,11 +13951,68 @@ a {
1400813951
]
1400913952
`;
1401013953

14011-
exports[`"modules" option show work with the "compileType" option using the "module" value: warnings 1`] = `Array []`;
13954+
exports[`"modules" option show work with the "mode" option using the "local" value: warnings 1`] = `Array []`;
13955+
13956+
exports[`"modules" option show work with the "mode: icss" and "exportOnlyLocals" options: errors 1`] = `Array []`;
13957+
13958+
exports[`"modules" option show work with the "mode: icss" and "exportOnlyLocals" options: module 1`] = `
13959+
"// Imports
13960+
import ___CSS_LOADER_ICSS_IMPORT_0___ from \\"-!../../../../../../src/index.js??ruleSet[1].rules[0].use[0]!./vars.css\\";
13961+
// Exports
13962+
export default {
13963+
\\"primary-color\\": \\"\\" + ___CSS_LOADER_ICSS_IMPORT_0___[\\"primary-color\\"] + \\"\\"
13964+
};
13965+
"
13966+
`;
13967+
13968+
exports[`"modules" option show work with the "mode: icss" and "exportOnlyLocals" options: result 1`] = `
13969+
Object {
13970+
"primary-color": "red",
13971+
}
13972+
`;
13973+
13974+
exports[`"modules" option show work with the "mode: icss" and "exportOnlyLocals" options: warnings 1`] = `Array []`;
13975+
13976+
exports[`"modules" option show work with the "mode: icss" and "namedExport" options: errors 1`] = `Array []`;
13977+
13978+
exports[`"modules" option show work with the "mode: icss" and "namedExport" options: module 1`] = `
13979+
"// Imports
13980+
import ___CSS_LOADER_API_IMPORT___ from \\"../../../../../../src/runtime/api.js\\";
13981+
import ___CSS_LOADER_ICSS_IMPORT_0___, * as ___CSS_LOADER_ICSS_IMPORT_0____NAMED___ from \\"-!../../../../../../src/index.js??ruleSet[1].rules[0].use[0]!./vars.css\\";
13982+
var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(function(i){return i[1]});
13983+
___CSS_LOADER_EXPORT___.i(___CSS_LOADER_ICSS_IMPORT_0___, \\"\\", true);
13984+
// Module
13985+
___CSS_LOADER_EXPORT___.push([module.id, \\".className {\\\\n color: \\" + ___CSS_LOADER_ICSS_IMPORT_0____NAMED___[\\"primaryColor\\"] + \\";\\\\n}\\\\n\\", \\"\\"]);
13986+
// Exports
13987+
export const primaryColor = \\"\\" + ___CSS_LOADER_ICSS_IMPORT_0____NAMED___[\\"primaryColor\\"] + \\"\\";
13988+
export default ___CSS_LOADER_EXPORT___;
13989+
"
13990+
`;
13991+
13992+
exports[`"modules" option show work with the "mode: icss" and "namedExport" options: result 1`] = `
13993+
Array [
13994+
Array [
13995+
"../../src/index.js??ruleSet[1].rules[0].use[0]!./modules/icss/tests-cases/import/vars.css",
13996+
"
13997+
",
13998+
"",
13999+
],
14000+
Array [
14001+
"./modules/icss/tests-cases/import/source.css",
14002+
".className {
14003+
color: red;
14004+
}
14005+
",
14006+
"",
14007+
],
14008+
]
14009+
`;
14010+
14011+
exports[`"modules" option show work with the "mode: icss" and "namedExport" options: warnings 1`] = `Array []`;
1401214012

14013-
exports[`"modules" option show work with the "compileType" option, case "duplicate-export": errors 1`] = `Array []`;
14013+
exports[`"modules" option show work with the "mode: icss" option, case "duplicate-export": errors 1`] = `Array []`;
1401414014

14015-
exports[`"modules" option show work with the "compileType" option, case "duplicate-export": module 1`] = `
14015+
exports[`"modules" option show work with the "mode: icss" option, case "duplicate-export": module 1`] = `
1401614016
"// Imports
1401714017
import ___CSS_LOADER_API_IMPORT___ from \\"../../../../../../src/runtime/api.js\\";
1401814018
var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(function(i){return i[1]});
@@ -14026,7 +14026,7 @@ export default ___CSS_LOADER_EXPORT___;
1402614026
"
1402714027
`;
1402814028

14029-
exports[`"modules" option show work with the "compileType" option, case "duplicate-export": result 1`] = `
14029+
exports[`"modules" option show work with the "mode: icss" option, case "duplicate-export": result 1`] = `
1403014030
Array [
1403114031
Array [
1403214032
"./modules/icss/tests-cases/duplicate-export/source.css",
@@ -14037,11 +14037,11 @@ Array [
1403714037
]
1403814038
`;
1403914039

14040-
exports[`"modules" option show work with the "compileType" option, case "duplicate-export": warnings 1`] = `Array []`;
14040+
exports[`"modules" option show work with the "mode: icss" option, case "duplicate-export": warnings 1`] = `Array []`;
1404114041

14042-
exports[`"modules" option show work with the "compileType" option, case "duplicate-export-in-multiple-export": errors 1`] = `Array []`;
14042+
exports[`"modules" option show work with the "mode: icss" option, case "duplicate-export-in-multiple-export": errors 1`] = `Array []`;
1404314043

14044-
exports[`"modules" option show work with the "compileType" option, case "duplicate-export-in-multiple-export": module 1`] = `
14044+
exports[`"modules" option show work with the "mode: icss" option, case "duplicate-export-in-multiple-export": module 1`] = `
1404514045
"// Imports
1404614046
import ___CSS_LOADER_API_IMPORT___ from \\"../../../../../../src/runtime/api.js\\";
1404714047
var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(function(i){return i[1]});
@@ -14055,7 +14055,7 @@ export default ___CSS_LOADER_EXPORT___;
1405514055
"
1405614056
`;
1405714057

14058-
exports[`"modules" option show work with the "compileType" option, case "duplicate-export-in-multiple-export": result 1`] = `
14058+
exports[`"modules" option show work with the "mode: icss" option, case "duplicate-export-in-multiple-export": result 1`] = `
1405914059
Array [
1406014060
Array [
1406114061
"./modules/icss/tests-cases/duplicate-export-in-multiple-export/source.css",
@@ -14066,11 +14066,11 @@ Array [
1406614066
]
1406714067
`;
1406814068

14069-
exports[`"modules" option show work with the "compileType" option, case "duplicate-export-in-multiple-export": warnings 1`] = `Array []`;
14069+
exports[`"modules" option show work with the "mode: icss" option, case "duplicate-export-in-multiple-export": warnings 1`] = `Array []`;
1407014070

14071-
exports[`"modules" option show work with the "compileType" option, case "empty-export": errors 1`] = `Array []`;
14071+
exports[`"modules" option show work with the "mode: icss" option, case "empty-export": errors 1`] = `Array []`;
1407214072

14073-
exports[`"modules" option show work with the "compileType" option, case "empty-export": module 1`] = `
14073+
exports[`"modules" option show work with the "mode: icss" option, case "empty-export": module 1`] = `
1407414074
"// Imports
1407514075
import ___CSS_LOADER_API_IMPORT___ from \\"../../../../../../src/runtime/api.js\\";
1407614076
var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(function(i){return i[1]});
@@ -14081,7 +14081,7 @@ export default ___CSS_LOADER_EXPORT___;
1408114081
"
1408214082
`;
1408314083

14084-
exports[`"modules" option show work with the "compileType" option, case "empty-export": result 1`] = `
14084+
exports[`"modules" option show work with the "mode: icss" option, case "empty-export": result 1`] = `
1408514085
Array [
1408614086
Array [
1408714087
"./modules/icss/tests-cases/empty-export/source.css",
@@ -14092,11 +14092,11 @@ Array [
1409214092
]
1409314093
`;
1409414094

14095-
exports[`"modules" option show work with the "compileType" option, case "empty-export": warnings 1`] = `Array []`;
14095+
exports[`"modules" option show work with the "mode: icss" option, case "empty-export": warnings 1`] = `Array []`;
1409614096

14097-
exports[`"modules" option show work with the "compileType" option, case "empty-import": errors 1`] = `Array []`;
14097+
exports[`"modules" option show work with the "mode: icss" option, case "empty-import": errors 1`] = `Array []`;
1409814098

14099-
exports[`"modules" option show work with the "compileType" option, case "empty-import": module 1`] = `
14099+
exports[`"modules" option show work with the "mode: icss" option, case "empty-import": module 1`] = `
1410014100
"// Imports
1410114101
import ___CSS_LOADER_API_IMPORT___ from \\"../../../../../../src/runtime/api.js\\";
1410214102
var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(function(i){return i[1]});
@@ -14107,7 +14107,7 @@ export default ___CSS_LOADER_EXPORT___;
1410714107
"
1410814108
`;
1410914109

14110-
exports[`"modules" option show work with the "compileType" option, case "empty-import": result 1`] = `
14110+
exports[`"modules" option show work with the "mode: icss" option, case "empty-import": result 1`] = `
1411114111
Array [
1411214112
Array [
1411314113
"./modules/icss/tests-cases/empty-import/source.css",
@@ -14118,11 +14118,11 @@ Array [
1411814118
]
1411914119
`;
1412014120

14121-
exports[`"modules" option show work with the "compileType" option, case "empty-import": warnings 1`] = `Array []`;
14121+
exports[`"modules" option show work with the "mode: icss" option, case "empty-import": warnings 1`] = `Array []`;
1412214122

14123-
exports[`"modules" option show work with the "compileType" option, case "export": errors 1`] = `Array []`;
14123+
exports[`"modules" option show work with the "mode: icss" option, case "export": errors 1`] = `Array []`;
1412414124

14125-
exports[`"modules" option show work with the "compileType" option, case "export": module 1`] = `
14125+
exports[`"modules" option show work with the "mode: icss" option, case "export": module 1`] = `
1412614126
"// Imports
1412714127
import ___CSS_LOADER_API_IMPORT___ from \\"../../../../../../src/runtime/api.js\\";
1412814128
var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(function(i){return i[1]});
@@ -14136,7 +14136,7 @@ export default ___CSS_LOADER_EXPORT___;
1413614136
"
1413714137
`;
1413814138

14139-
exports[`"modules" option show work with the "compileType" option, case "export": result 1`] = `
14139+
exports[`"modules" option show work with the "mode: icss" option, case "export": result 1`] = `
1414014140
Array [
1414114141
Array [
1414214142
"./modules/icss/tests-cases/export/source.css",
@@ -14147,11 +14147,11 @@ Array [
1414714147
]
1414814148
`;
1414914149

14150-
exports[`"modules" option show work with the "compileType" option, case "export": warnings 1`] = `Array []`;
14150+
exports[`"modules" option show work with the "mode: icss" option, case "export": warnings 1`] = `Array []`;
1415114151

14152-
exports[`"modules" option show work with the "compileType" option, case "export-reserved-keywords": errors 1`] = `Array []`;
14152+
exports[`"modules" option show work with the "mode: icss" option, case "export-reserved-keywords": errors 1`] = `Array []`;
1415314153

14154-
exports[`"modules" option show work with the "compileType" option, case "export-reserved-keywords": module 1`] = `
14154+
exports[`"modules" option show work with the "mode: icss" option, case "export-reserved-keywords": module 1`] = `
1415514155
"// Imports
1415614156
import ___CSS_LOADER_API_IMPORT___ from \\"../../../../../../src/runtime/api.js\\";
1415714157
var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(function(i){return i[1]});
@@ -14166,7 +14166,7 @@ export default ___CSS_LOADER_EXPORT___;
1416614166
"
1416714167
`;
1416814168

14169-
exports[`"modules" option show work with the "compileType" option, case "export-reserved-keywords": result 1`] = `
14169+
exports[`"modules" option show work with the "mode: icss" option, case "export-reserved-keywords": result 1`] = `
1417014170
Array [
1417114171
Array [
1417214172
"./modules/icss/tests-cases/export-reserved-keywords/source.css",
@@ -14177,11 +14177,11 @@ Array [
1417714177
]
1417814178
`;
1417914179

14180-
exports[`"modules" option show work with the "compileType" option, case "export-reserved-keywords": warnings 1`] = `Array []`;
14180+
exports[`"modules" option show work with the "mode: icss" option, case "export-reserved-keywords": warnings 1`] = `Array []`;
1418114181

14182-
exports[`"modules" option show work with the "compileType" option, case "import": errors 1`] = `Array []`;
14182+
exports[`"modules" option show work with the "mode: icss" option, case "import": errors 1`] = `Array []`;
1418314183

14184-
exports[`"modules" option show work with the "compileType" option, case "import": module 1`] = `
14184+
exports[`"modules" option show work with the "mode: icss" option, case "import": module 1`] = `
1418514185
"// Imports
1418614186
import ___CSS_LOADER_API_IMPORT___ from \\"../../../../../../src/runtime/api.js\\";
1418714187
import ___CSS_LOADER_ICSS_IMPORT_0___ from \\"-!../../../../../../src/index.js??ruleSet[1].rules[0].use[0]!./vars.css\\";
@@ -14197,7 +14197,7 @@ export default ___CSS_LOADER_EXPORT___;
1419714197
"
1419814198
`;
1419914199

14200-
exports[`"modules" option show work with the "compileType" option, case "import": result 1`] = `
14200+
exports[`"modules" option show work with the "mode: icss" option, case "import": result 1`] = `
1420114201
Array [
1420214202
Array [
1420314203
"../../src/index.js??ruleSet[1].rules[0].use[0]!./modules/icss/tests-cases/import/vars.css",
@@ -14216,11 +14216,11 @@ Array [
1421614216
]
1421714217
`;
1421814218

14219-
exports[`"modules" option show work with the "compileType" option, case "import": warnings 1`] = `Array []`;
14219+
exports[`"modules" option show work with the "mode: icss" option, case "import": warnings 1`] = `Array []`;
1422014220

14221-
exports[`"modules" option show work with the "compileType" option, case "import-reserved-keywords": errors 1`] = `Array []`;
14221+
exports[`"modules" option show work with the "mode: icss" option, case "import-reserved-keywords": errors 1`] = `Array []`;
1422214222

14223-
exports[`"modules" option show work with the "compileType" option, case "import-reserved-keywords": module 1`] = `
14223+
exports[`"modules" option show work with the "mode: icss" option, case "import-reserved-keywords": module 1`] = `
1422414224
"// Imports
1422514225
import ___CSS_LOADER_API_IMPORT___ from \\"../../../../../../src/runtime/api.js\\";
1422614226
import ___CSS_LOADER_ICSS_IMPORT_0___ from \\"-!../../../../../../src/index.js??ruleSet[1].rules[0].use[0]!./vars.css\\";
@@ -14237,7 +14237,7 @@ export default ___CSS_LOADER_EXPORT___;
1423714237
"
1423814238
`;
1423914239

14240-
exports[`"modules" option show work with the "compileType" option, case "import-reserved-keywords": result 1`] = `
14240+
exports[`"modules" option show work with the "mode: icss" option, case "import-reserved-keywords": result 1`] = `
1424114241
Array [
1424214242
Array [
1424314243
"../../src/index.js??ruleSet[1].rules[0].use[0]!./modules/icss/tests-cases/import-reserved-keywords/vars.css",
@@ -14257,11 +14257,11 @@ Array [
1425714257
]
1425814258
`;
1425914259

14260-
exports[`"modules" option show work with the "compileType" option, case "import-reserved-keywords": warnings 1`] = `Array []`;
14260+
exports[`"modules" option show work with the "mode: icss" option, case "import-reserved-keywords": warnings 1`] = `Array []`;
1426114261

14262-
exports[`"modules" option show work with the "compileType" option, case "multiple-export": errors 1`] = `Array []`;
14262+
exports[`"modules" option show work with the "mode: icss" option, case "multiple-export": errors 1`] = `Array []`;
1426314263

14264-
exports[`"modules" option show work with the "compileType" option, case "multiple-export": module 1`] = `
14264+
exports[`"modules" option show work with the "mode: icss" option, case "multiple-export": module 1`] = `
1426514265
"// Imports
1426614266
import ___CSS_LOADER_API_IMPORT___ from \\"../../../../../../src/runtime/api.js\\";
1426714267
var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(function(i){return i[1]});
@@ -14276,7 +14276,7 @@ export default ___CSS_LOADER_EXPORT___;
1427614276
"
1427714277
`;
1427814278

14279-
exports[`"modules" option show work with the "compileType" option, case "multiple-export": result 1`] = `
14279+
exports[`"modules" option show work with the "mode: icss" option, case "multiple-export": result 1`] = `
1428014280
Array [
1428114281
Array [
1428214282
"./modules/icss/tests-cases/multiple-export/source.css",
@@ -14287,11 +14287,11 @@ Array [
1428714287
]
1428814288
`;
1428914289

14290-
exports[`"modules" option show work with the "compileType" option, case "multiple-export": warnings 1`] = `Array []`;
14290+
exports[`"modules" option show work with the "mode: icss" option, case "multiple-export": warnings 1`] = `Array []`;
1429114291

14292-
exports[`"modules" option show work with the "compileType" option, case "multiple-keys-values-in-export": errors 1`] = `Array []`;
14292+
exports[`"modules" option show work with the "mode: icss" option, case "multiple-keys-values-in-export": errors 1`] = `Array []`;
1429314293

14294-
exports[`"modules" option show work with the "compileType" option, case "multiple-keys-values-in-export": module 1`] = `
14294+
exports[`"modules" option show work with the "mode: icss" option, case "multiple-keys-values-in-export": module 1`] = `
1429514295
"// Imports
1429614296
import ___CSS_LOADER_API_IMPORT___ from \\"../../../../../../src/runtime/api.js\\";
1429714297
var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(function(i){return i[1]});
@@ -14309,7 +14309,7 @@ export default ___CSS_LOADER_EXPORT___;
1430914309
"
1431014310
`;
1431114311

14312-
exports[`"modules" option show work with the "compileType" option, case "multiple-keys-values-in-export": result 1`] = `
14312+
exports[`"modules" option show work with the "mode: icss" option, case "multiple-keys-values-in-export": result 1`] = `
1431314313
Array [
1431414314
Array [
1431514315
"./modules/icss/tests-cases/multiple-keys-values-in-export/source.css",
@@ -14320,4 +14320,4 @@ Array [
1432014320
]
1432114321
`;
1432214322

14323-
exports[`"modules" option show work with the "compileType" option, case "multiple-keys-values-in-export": warnings 1`] = `Array []`;
14323+
exports[`"modules" option show work with the "mode: icss" option, case "multiple-keys-values-in-export": warnings 1`] = `Array []`;

0 commit comments

Comments
 (0)