/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/Chunk.unittest.js
30 строк
724 B
Alexander Akait
refactor: strict types for the test suite (#21147)
09 июн 2026, 20:15
Не верифицирован
09 июн 2026, 20:15
9bd0b91
Код
Авторство
О чём код?
"use strict"; const Chunk = require("../lib/Chunk"); describe("Chunk", () => { /** @type {InstanceType<typeof Chunk>} */ let ChunkInstance; beforeEach(() => { const ChunkAny = /** @type {new (...args: unknown[]) => InstanceType<typeof Chunk>} */ ( /** @type {unknown} */ (Chunk) ); ChunkInstance = new ChunkAny("chunk-test", "module-test", "loc-test"); }); it("should have debugId more than 999", () => { expect(ChunkInstance.debugId).toBeGreaterThan(999); }); it("should not be the initial instance", () => { expect(ChunkInstance.canBeInitial()).toBe(false); }); describe("hasRuntime", () => { it("returns false", () => { expect(ChunkInstance.hasRuntime()).toBe(false); }); }); });