/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v5.108.0
test/ContextModule.unittest.js
33 строки
700 B
Alexander Akait
refactor: strict types for the test suite (#21147)
09 июн 2026, 20:15
Не верифицирован
09 июн 2026, 20:15
9bd0b91
Код
Авторство
О чём код?
"use strict"; const ContextModule = require("../lib/ContextModule"); describe("contextModule", () => { let contextModule; /** @type {string} */ let request; beforeEach(() => { request = "/some/request"; }); describe("#identifier", () => { it("returns an safe identifier for this module", () => { contextModule = new ContextModule( () => {}, /** @type {import("../lib/ContextModule").ContextModuleOptions} */ ( /** @type {unknown} */ ({ type: "javascript/auto", request, resource: "a", mode: "lazy", regExp: /a|b/ }) ) ); expect(contextModule.identifier()).toEqual( expect.stringContaining("/a%7Cb/") ); }); }); });