Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: enable more webpack-test #4351

Merged
merged 1 commit into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

4 changes: 0 additions & 4 deletions webpack-test/cases/entry-inline/no-var-leak/test.filter.js

This file was deleted.

2 changes: 1 addition & 1 deletion webpack-test/cases/errors/case-sensitive/test.filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ module.exports = function(config) {
return fs.existsSync(path.join(__dirname, "TEST.FILTER.JS"));
};
*/
module.exports = () => {return false}
module.exports = () => {return "https://github.com/web-infra-dev/rspack/issues/4347"}

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { FilteredStatus } = require("../../../lib/util/filterUtil")

module.exports = () => {return false}
module.exports = () => {return [FilteredStatus.PARTIAL_PASS, "https://github.com/web-infra-dev/rspack/issues/4348"]}


This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { FilteredStatus } = require("../../../lib/util/filterUtil")

module.exports = () => {return false}
module.exports = () => {return [FilteredStatus.PARTIAL_PASS, "https://github.com/web-infra-dev/rspack/issues/4348"]}


Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { FilteredStatus } = require("../../../lib/util/filterUtil")

module.exports = () => {return false}
module.exports = () => {return [FilteredStatus.PARTIAL_PASS, "https://github.com/web-infra-dev/rspack/issues/4348"]}


Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

module.exports = () => {return false}
module.exports = () => {return "https://github.com/web-infra-dev/rspack/issues/3738"}


2 changes: 1 addition & 1 deletion webpack-test/cases/errors/load-module-cycle/test.filter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

module.exports = () => {return false}
module.exports = () => {return "https://github.com/web-infra-dev/rspack/issues/3738"}


2 changes: 1 addition & 1 deletion webpack-test/cases/errors/load-module-error/test.filter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

module.exports = () => {return false}
module.exports = () => {return "https://github.com/web-infra-dev/rspack/issues/3738"}


Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { FilteredStatus } = require("../../../lib/util/filterUtil")

module.exports = () => {return false}
module.exports = () => {return [FilteredStatus.PARTIAL_PASS, "https://github.com/web-infra-dev/rspack/issues/4349"]}


Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { FilteredStatus } = require("../../../lib/util/filterUtil")

module.exports = () => {return false}
module.exports = () => {return [FilteredStatus.PARTIAL_PASS, "https://github.com/web-infra-dev/rspack/issues/4348"]}


3 changes: 2 additions & 1 deletion webpack-test/cases/errors/module-request/test.filter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { FilteredStatus } = require("../../../lib/util/filterUtil")

module.exports = () => {return false}
module.exports = () => {return [FilteredStatus.PARTIAL_PASS, "https://github.com/web-infra-dev/rspack/issues/4348"]}


13 changes: 12 additions & 1 deletion webpack-test/cases/esm/import-meta/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,16 @@ it("should return undefined for unknown property", () => {
expect(import.meta.other).toBe(undefined);
if (typeof import.meta.other !== "undefined") require("fail");
expect(() => import.meta.other.other.other).toThrowError();
// if (typeof import.meta.other.other.other !== "undefined") require("fail");
});

it("should add warning on direct import.meta usage", () => {
expect(Object.keys(import.meta)).toHaveLength(0);
});

it("should support destructuring assignment", () => {
let version, url2, c;
({ webpack: version } = { url: url2 } = { c } = import.meta);
expect(version).toBeTypeOf("number");
expect(url2).toBe(url);
expect(c).toBe(undefined);
});
3 changes: 2 additions & 1 deletion webpack-test/cases/esm/import-meta/test.filter.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { FilteredStatus } = require("../../../lib/util/filterUtil")

/*
const supportsRequireInModule = require("../../../helpers/supportsRequireInModule");
Expand All @@ -7,6 +8,6 @@ module.exports = config => {
};

*/
module.exports = () => {return false}
module.exports = () => {return [FilteredStatus.PARTIAL_PASS, "https://github.com/web-infra-dev/rspack/issues/4350"]}


5 changes: 5 additions & 0 deletions webpack-test/cases/esm/import-meta/warnings.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = [
[
/Accessing import.meta directly is unsupported \(only property access or destructuring is supported\)/
]
];
4 changes: 0 additions & 4 deletions webpack-test/cases/inner-graph/circular/test.filter.js

This file was deleted.

4 changes: 0 additions & 4 deletions webpack-test/cases/inner-graph/circular2/test.filter.js

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions webpack-test/cases/inner-graph/extend-class/test.filter.js

This file was deleted.

4 changes: 0 additions & 4 deletions webpack-test/cases/inner-graph/no-side-effects/test.filter.js

This file was deleted.

4 changes: 0 additions & 4 deletions webpack-test/cases/inner-graph/pure-in-removed/test.filter.js

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions webpack-test/cases/inner-graph/simple/test.filter.js

This file was deleted.

4 changes: 0 additions & 4 deletions webpack-test/cases/inner-graph/static-of-class/test.filter.js

This file was deleted.

4 changes: 0 additions & 4 deletions webpack-test/cases/inner-graph/switch/test.filter.js

This file was deleted.

4 changes: 0 additions & 4 deletions webpack-test/cases/inner-graph/try-globals/test.filter.js

This file was deleted.