webpack/test/configCases/library/1-use-library/index.js

18 lines
457 B
JavaScript
Raw Normal View History

import d from "library";
2017-06-02 20:22:42 +08:00
import { a, b, external } from "library";
it(
"should be able to import harmony exports from library (" + NAME + ")",
function () {
expect(d).toBe("default-value");
expect(a).toBe("a");
expect(b).toBe("b");
if (typeof TEST_EXTERNAL !== "undefined" && TEST_EXTERNAL) {
expect(external).toEqual(["external"]);
expect(external).toBe(require("external"));
} else {
expect(external).toBe("non-external");
}
2017-06-02 20:22:42 +08:00
}
);