Skip to content

Commit a69dabb

Browse files
committed
test: move to webpack-test
1 parent a204c8e commit a69dabb

9 files changed

Lines changed: 5 additions & 5 deletions

File tree

packages/rspack-test-tools/tests/configCases/json/generator-json-parse-true/data.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/rspack-test-tools/tests/configCases/json/generator-json-parse-false/data.json renamed to tests/webpack-test/configCases/json/generator-json-parse-false/data.json

File renamed without changes.

packages/rspack-test-tools/tests/configCases/json/generator-json-parse-false/data1.json renamed to tests/webpack-test/configCases/json/generator-json-parse-false/data1.json

File renamed without changes.

packages/rspack-test-tools/tests/configCases/json/generator-json-parse-false/index.js renamed to tests/webpack-test/configCases/json/generator-json-parse-false/index.js

File renamed without changes.

packages/rspack-test-tools/tests/configCases/json/generator-json-parse-false/rspack.config.js renamed to tests/webpack-test/configCases/json/generator-json-parse-false/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/** @type {import("@rspack/core").Configuration} */
1+
/** @type {import("../../../../").Configuration} */
22
module.exports = {
33
devtool: false,
44
mode: "development",
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"123this is a large JSON object": "that should be converted to JSON.parse by default"}

packages/rspack-test-tools/tests/configCases/json/generator-json-parse-true/data1.json renamed to tests/webpack-test/configCases/json/generator-json-parse-true/data1.json

File renamed without changes.

packages/rspack-test-tools/tests/configCases/json/generator-json-parse-true/index.js renamed to tests/webpack-test/configCases/json/generator-json-parse-true/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ it("should use JSON.parse", () => {
66
const data2 = require('data:application/json,{"this is a large JSON object": "that should be converted to JSON.parse by default"}');
77
const data3 = require('./data1.json');
88

9-
expect(data).toMatchObject({["this is a large JSON object"]: "that should be converted to JSON.parse by default"});
9+
expect(data).toMatchObject({["123this is a large JSON object"]: "that should be converted to JSON.parse by default"});
1010
expect(data2).toMatchObject({["this is a large JSON object"]: "that should be converted to JSON.parse by default"});
1111
expect(data3).toMatchObject([{"this is a large JSON object": "that should be converted to JSON.parse by default"}]);
1212

@@ -19,6 +19,6 @@ it("should not call JSON.parse when resourceQuery is JSONParse=false", () => {
1919

2020
const data = require('./data.json?JSONParse=false');
2121

22-
expect(data).toMatchObject({["this is a large JSON object"]: "that should be converted to JSON.parse by default"});
22+
expect(data).toMatchObject({["123this is a large JSON object"]: "that should be converted to JSON.parse by default"});
2323
expect(JSONParse).not.toHaveBeenCalled();
2424
});

packages/rspack-test-tools/tests/configCases/json/generator-json-parse-true/rspack.config.js renamed to tests/webpack-test/configCases/json/generator-json-parse-true/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/** @type {import("@rspack/core").Configuration} */
1+
/** @type {import("../../../../").Configuration} */
22
module.exports = {
33
devtool: false,
44
mode: "development",

0 commit comments

Comments
 (0)