2017-01-11 17:51:58 +08:00
|
|
|
import "./module";
|
|
|
|
|
|
|
|
(function() {
|
|
|
|
module.exports = 1;
|
|
|
|
}).should.throw();
|
|
|
|
|
2018-01-27 05:51:03 +08:00
|
|
|
expect((typeof module.exports)).toBe("undefined");
|
2017-01-11 17:51:58 +08:00
|
|
|
|
2018-01-27 05:51:03 +08:00
|
|
|
expect((typeof define)).toBe("undefined");
|
2017-01-11 17:51:58 +08:00
|
|
|
(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
|
2018-01-27 05:51:03 +08:00
|
|
|
expect(Object.keys(exports)).toEqual([]);
|
2017-05-25 19:12:34 +08:00
|
|
|
}
|