mirror of https://github.com/webpack/webpack.git
test: more
This commit is contained in:
parent
3d1db217fa
commit
25fc9d3a3b
|
@ -5,6 +5,7 @@ describe("TestCases", () => {
|
||||||
name: "all-combined",
|
name: "all-combined",
|
||||||
mode: "production",
|
mode: "production",
|
||||||
devtool: "source-map",
|
devtool: "source-map",
|
||||||
|
minimize: true,
|
||||||
optimization: {
|
optimization: {
|
||||||
moduleIds: "named",
|
moduleIds: "named",
|
||||||
chunkIds: "named"
|
chunkIds: "named"
|
||||||
|
|
|
@ -7,6 +7,7 @@ export function mixin1(_class) {return _class}
|
||||||
export function mixin2(_class) {return _class}
|
export function mixin2(_class) {return _class}
|
||||||
export function mixin3(_class) {return _class}
|
export function mixin3(_class) {return _class}
|
||||||
export function mixin4(_class) {return _class}
|
export function mixin4(_class) {return _class}
|
||||||
|
export function mixin5(_class) {return _class}
|
||||||
export function getField() { return "test" }
|
export function getField() { return "test" }
|
||||||
export class BaseError extends Error {}
|
export class BaseError extends Error {}
|
||||||
export class BaseError1 extends Error {}
|
export class BaseError1 extends Error {}
|
||||||
|
@ -28,6 +29,7 @@ export const exportsInfoForMixin1 = __webpack_exports_info__.mixin1.used;
|
||||||
export const exportsInfoForMixin2 = __webpack_exports_info__.mixin2.used;
|
export const exportsInfoForMixin2 = __webpack_exports_info__.mixin2.used;
|
||||||
export const exportsInfoForMixin3 = __webpack_exports_info__.mixin3.used;
|
export const exportsInfoForMixin3 = __webpack_exports_info__.mixin3.used;
|
||||||
export const exportsInfoForMixin4 = __webpack_exports_info__.mixin4.used;
|
export const exportsInfoForMixin4 = __webpack_exports_info__.mixin4.used;
|
||||||
|
export const exportsInfoForMixin5 = __webpack_exports_info__.mixin5.used;
|
||||||
export const exportsInfoForgetField = __webpack_exports_info__.getField.used;
|
export const exportsInfoForgetField = __webpack_exports_info__.getField.used;
|
||||||
export const exportsInfoForBaseError = __webpack_exports_info__.BaseError.used;
|
export const exportsInfoForBaseError = __webpack_exports_info__.BaseError.used;
|
||||||
export const exportsInfoForBaseError1 = __webpack_exports_info__.BaseError1.used;
|
export const exportsInfoForBaseError1 = __webpack_exports_info__.BaseError1.used;
|
||||||
|
|
|
@ -11,6 +11,7 @@ import {
|
||||||
exportsInfoForMixin2,
|
exportsInfoForMixin2,
|
||||||
exportsInfoForMixin3,
|
exportsInfoForMixin3,
|
||||||
exportsInfoForMixin4,
|
exportsInfoForMixin4,
|
||||||
|
exportsInfoForMixin5,
|
||||||
exportsInfoForBaseError,
|
exportsInfoForBaseError,
|
||||||
exportsInfoForBaseError1,
|
exportsInfoForBaseError1,
|
||||||
exportsInfoForBaseError2,
|
exportsInfoForBaseError2,
|
||||||
|
@ -25,6 +26,7 @@ it("should load modules correctly", () => {
|
||||||
require("./module5");
|
require("./module5");
|
||||||
require("./module6");
|
require("./module6");
|
||||||
require("./module7");
|
require("./module7");
|
||||||
|
require("./module8");
|
||||||
});
|
});
|
||||||
|
|
||||||
if (process.env.NODE_ENV === "production") {
|
if (process.env.NODE_ENV === "production") {
|
||||||
|
@ -60,6 +62,7 @@ it("Z used, inner graph can not determine const usage", () => {
|
||||||
it("Pure super expression should be unused, another used", () => {
|
it("Pure super expression should be unused, another used", () => {
|
||||||
if (process.env.NODE_ENV === "production") {
|
if (process.env.NODE_ENV === "production") {
|
||||||
expect(exportsInfoForMixin4).toBe(false);
|
expect(exportsInfoForMixin4).toBe(false);
|
||||||
|
expect(exportsInfoForMixin5).toBe(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
expect(exportsInfoForMixin1).toBe(true);
|
expect(exportsInfoForMixin1).toBe(true);
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
import { mixin5 } from "./dep2";
|
||||||
|
|
||||||
|
class Bar extends /*#__PURE__*/ mixin5(null) {
|
||||||
|
static displayName = "Point";
|
||||||
|
}
|
||||||
|
|
||||||
|
function test() {
|
||||||
|
return Bar.displayName;
|
||||||
|
}
|
Loading…
Reference in New Issue