webpack/test/cases/parsing/issue-2942/index.js

13 lines
455 B
JavaScript
Raw Normal View History

2016-09-09 04:26:28 +08:00
it("should polyfill System", function() {
if (typeof System === "object" && typeof System.register === "function") {
2016-09-09 04:26:28 +08:00
require("fail");
}
expect((typeof System)).toBe("object");
expect((typeof System.register)).toBe("undefined");
expect((typeof System.get)).toBe("undefined");
expect((typeof System.set)).toBe("undefined");
expect((typeof System.anyNewItem)).toBe("undefined");
2016-09-09 04:26:28 +08:00
var x = System.anyNewItem;
expect((typeof x)).toBe("undefined");
2017-02-24 21:13:42 +08:00
})