@rspack-canary/test-tools 1.6.4-canary-dceb4c75-20251116173406 → 1.6.4-canary-0853cbf5-20251117173648

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,6 +21,7 @@ function describeByWalk(testFile, createCase, options = {}) {
21
21
  .replace(/\.(diff|hot)?test\.(j|t)s/, "");
22
22
  const testId = testBasename.charAt(0).toLowerCase() + testBasename.slice(1);
23
23
  const sourceBase = options.source || node_path_1.default.join(node_path_1.default.dirname(testFile), `${testId}Cases`);
24
+ const testSourceId = node_path_1.default.basename(sourceBase);
24
25
  const distBase = options.dist || node_path_1.default.join(node_path_1.default.dirname(testFile), "js", testId);
25
26
  const level = options.level || 2;
26
27
  const type = options.type || "directory";
@@ -54,7 +55,10 @@ function describeByWalk(testFile, createCase, options = {}) {
54
55
  describeDirectory(caseName, currentLevel - 1);
55
56
  }
56
57
  else {
57
- const name = (0, _1.escapeSep)(node_path_1.default.join(`${testId}Cases`, caseName).split(".").shift());
58
+ const name = (0, _1.escapeSep)(node_path_1.default
59
+ .join(`${testId}Cases-${testSourceId}`, caseName)
60
+ .split(".")
61
+ .shift());
58
62
  describeFn(name, () => {
59
63
  const source = node_path_1.default.join(sourceBase, caseName);
60
64
  let dist = "";
@@ -0,0 +1 @@
1
+ export declare function disableIconvLiteWarning(): void;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.disableIconvLiteWarning = disableIconvLiteWarning;
4
+ function disableIconvLiteWarning() {
5
+ for (const [path, mod] of Object.entries(require.cache)) {
6
+ if (path.includes("iconv-lite") &&
7
+ typeof mod?.exports === "object" &&
8
+ typeof mod.exports.decode === "function") {
9
+ mod.exports.skipDecodeWarning = true;
10
+ }
11
+ }
12
+ }
package/dist/index.js CHANGED
@@ -22,3 +22,4 @@ __exportStar(require("./test/context"), exports);
22
22
  __exportStar(require("./test/creator"), exports);
23
23
  __exportStar(require("./test/tester"), exports);
24
24
  __exportStar(require("./type"), exports);
25
+ require("./helper/disable-iconv-lite-warning").disableIconvLiteWarning();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack-canary/test-tools",
3
- "version": "1.6.4-canary-dceb4c75-20251116173406",
3
+ "version": "1.6.4-canary-0853cbf5-20251117173648",
4
4
  "license": "MIT",
5
5
  "description": "Test tools for rspack",
6
6
  "main": "dist/index.js",
@@ -65,7 +65,7 @@
65
65
  "@types/jsdom": "^21.1.7",
66
66
  "typescript": "^5.9.3",
67
67
  "wast-loader": "^1.14.1",
68
- "@rspack/core": "npm:@rspack-canary/core@1.6.4-canary-dceb4c75-20251116173406"
68
+ "@rspack/core": "npm:@rspack-canary/core@1.6.4-canary-0853cbf5-20251117173648"
69
69
  },
70
70
  "peerDependencies": {
71
71
  "@rspack/core": ">=1.0.0"