Skip to content

Commit 2d8c558

Browse files
authored
chore: Revert "test: enable some test cases (#10288)" (#10300)
Revert "test: enable some test cases (#10288)" This reverts commit e27eee3.
1 parent 37e4827 commit 2d8c558

File tree

29 files changed

+66
-404
lines changed

29 files changed

+66
-404
lines changed

pnpm-lock.yaml

Lines changed: 0 additions & 136 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/webpack-test/ConfigTestCases.template.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,9 @@ const describeCases = config => {
171171
});
172172
afterAll(() => {
173173
// cleanup
174-
// options = undefined;
175-
// optionsArr = undefined;
176-
// testConfig = undefined;
174+
options = undefined;
175+
optionsArr = undefined;
176+
testConfig = undefined;
177177
});
178178
beforeAll(() => {
179179
rimrafSync(cacheDirectory);
@@ -470,8 +470,7 @@ const describeCases = config => {
470470
value: "Module"
471471
});
472472
return m;
473-
},
474-
__STATS_I__: i,
473+
}
475474
};
476475

477476
let runInNewContext = false;
@@ -482,8 +481,6 @@ const describeCases = config => {
482481
baseModuleScope.window = globalContext;
483482
baseModuleScope.self = globalContext;
484483
baseModuleScope.document = globalContext.document;
485-
baseModuleScope.getComputedStyle =
486-
globalContext.getComputedStyle;
487484
baseModuleScope.URL = URL;
488485
if (typeof Blob !== "undefined") {
489486
baseModuleScope.Blob = Blob;
@@ -495,7 +492,7 @@ const describeCases = config => {
495492
runInNewContext = true;
496493
}
497494
if (testConfig.moduleScope) {
498-
testConfig.moduleScope(baseModuleScope, options);
495+
testConfig.moduleScope(baseModuleScope);
499496
}
500497
const esmContext = vm.createContext(baseModuleScope, {
501498
name: "context for esm"
@@ -671,7 +668,7 @@ const describeCases = config => {
671668
moduleScope.__STATS__ = getStatsJson();
672669
}
673670
if (testConfig.moduleScope) {
674-
testConfig.moduleScope(moduleScope, options);
671+
testConfig.moduleScope(moduleScope);
675672
}
676673
if (!runInNewContext)
677674
content = `Object.assign(global, _globalAssign); ${content}`;

tests/webpack-test/StatsTestCases.basictest.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ describe("StatsTestCases", () => {
186186
actual = actual
187187
.replace(/\u001b\[[0-9;]*m/g, "")
188188
// CHANGE: The time unit display in Rspack is second
189-
.replace(/\d+([.\d]+)?(\s?m?s)/g, "X$1");
189+
.replace(/\d+([.\d]+)(\s?s)/g, "X$1");
190190
} else {
191191
actual = stderr.toStringRaw() + actual;
192192
actual = actual
@@ -195,7 +195,7 @@ describe("StatsTestCases", () => {
195195
.replace(/\u001b\[39m\u001b\[22m/g, "</CLR>")
196196
.replace(/\u001b\[([0-9;]*)m/g, "<CLR=$1>")
197197
// CHANGE: The time unit display in Rspack is second
198-
.replace(/[.0-9]+(<\/CLR>)?(\s?m?s)/g, "X$1$2");
198+
.replace(/[.0-9]+(<\/CLR>)?(\s?s)/g, "X$1$2");
199199
}
200200
// cspell:ignore Xdir
201201
const testPath = path.join(base, testName);

0 commit comments

Comments
 (0)