webpack/test/Chunk.unittest.js

26 lines
543 B
JavaScript
Raw Normal View History

2017-01-17 23:40:00 +08:00
"use strict";
2017-01-17 23:40:00 +08:00
const Chunk = require("../lib/Chunk");
2017-01-17 23:40:00 +08:00
describe("Chunk", () => {
let ChunkInstance;
2018-01-24 20:17:21 +08:00
beforeEach(() => {
ChunkInstance = new Chunk("chunk-test", "module-test", "loc-test");
});
2018-01-24 20:17:21 +08:00
it("should have debugId more than 999", () => {
expect(ChunkInstance.debugId).toBeGreaterThan(999);
});
2018-01-24 20:17:21 +08:00
it("should not be the initial instance", () => {
expect(ChunkInstance.canBeInitial()).toBe(false);
});
2017-01-17 23:40:00 +08:00
describe("hasRuntime", () => {
2018-01-24 20:17:21 +08:00
it("returns false", () => {
expect(ChunkInstance.hasRuntime()).toBe(false);
});
});
});