webpack/test/cases/inner-graph/extend-class/index.js

32 lines
686 B
JavaScript
Raw Normal View History

2020-04-09 00:22:40 +08:00
import {
exportsInfoForA,
exportsInfoForB,
2020-04-09 06:18:39 +08:00
exportsInfoForC,
2020-04-09 00:22:40 +08:00
exportsInfoForY,
exportsInfoForMixin1,
2020-04-09 06:18:39 +08:00
exportsInfoForMixin2,
exportsInfoForMixin3
2020-04-09 00:22:40 +08:00
} from "./dep2";
2020-04-06 03:56:53 +08:00
2020-04-09 00:22:40 +08:00
it("should load modules correctly", () => {
require("./module1");
require("./module2");
2020-04-06 03:56:53 +08:00
});
it("B should not be used", () => {
expect(exportsInfoForB).toBe(false);
});
it("A should be used", () => {
expect(exportsInfoForA).toBe(true);
});
2020-04-09 00:22:40 +08:00
2020-04-09 06:18:39 +08:00
it("Pure super expression should be unused, another used", () => {
2020-04-09 00:22:40 +08:00
expect(exportsInfoForMixin1).toBe(false);
2020-04-09 06:18:39 +08:00
2020-04-09 00:22:40 +08:00
expect(exportsInfoForMixin2).toBe(true);
2020-04-09 06:18:39 +08:00
expect(exportsInfoForMixin3).toBe(true);
expect(exportsInfoForC).toBe(true);
2020-04-09 00:22:40 +08:00
expect(exportsInfoForY).toBe(true);
});