webpack/test/cases/parsing/harmony-tdz/index.js

9 lines
280 B
JavaScript

import value, { exception } from "./module";
it("should have a TDZ for exported const values", function() {
expect((typeof exception)).toBe("object");
exception.should.be.instanceof(Error);
exception.message.should.match(/ is not defined$/);
expect(value).toBe("value");
});