webpack/test/cases/parsing/harmony-commonjs-mix/module1.js

20 lines
412 B
JavaScript
Raw Normal View History

import "./module";
(function() {
module.exports = 1;
}).should.throw();
expect((typeof module.exports)).toBe("undefined");
expect((typeof define)).toBe("undefined");
(function() {
define(function() {})
}).should.throw(/define is not defined/);
export default 1234;
2017-05-25 19:12:34 +08:00
if(eval("typeof exports !== \"undefined\"")) {
// exports is node.js exports and not webpacks
expect(Object.keys(exports)).toEqual([]);
2017-05-25 19:12:34 +08:00
}