2014-08-25 15:50:26 +08:00
|
|
|
it("should have __webpack_hash__", function() {
|
2018-02-25 08:20:45 +08:00
|
|
|
expect(__webpack_hash__).toBeTypeOf("string");
|
2018-01-27 06:59:38 +08:00
|
|
|
expect(__webpack_hash__).toMatch(/^[0-9a-f]{20}$/);
|
2018-11-06 02:04:41 +08:00
|
|
|
return import("./chunk").then(({ hash }) => {
|
|
|
|
expect(hash).toBe(__webpack_hash__);
|
|
|
|
});
|
2017-03-22 23:09:53 +08:00
|
|
|
});
|
|
|
|
it("should have __webpack_chunkname__", function() {
|
2018-02-25 08:20:45 +08:00
|
|
|
expect(__webpack_chunkname__).toBeTypeOf("string");
|
|
|
|
expect(__webpack_chunkname__).toBe("other");
|
2018-11-06 02:04:41 +08:00
|
|
|
return import("./chunk").then(({ chunkName }) => {
|
|
|
|
expect(chunkName).toBe(__webpack_chunkname__);
|
|
|
|
});
|
2017-03-22 23:09:53 +08:00
|
|
|
});
|