/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/WebpackError.unittest.js
23 строки
573 B
Alexander Akait
refactor: strict types for the test suite (#21147)
09 июн 2026, 20:15
Не верифицирован
09 июн 2026, 20:15
9bd0b91
Код
Авторство
О чём код?
"use strict"; const WebpackError = require("../lib/errors/WebpackError"); describe("WebpackError", () => { class CustomError extends WebpackError { constructor() { super(); this.name = "CustomError"; this.message = "CustomMessage"; this.details = "CustomDetails"; Error.captureStackTrace(this, this.constructor); } } it("should provide inspect method for use by for util.inspect", () => { const error = new CustomError(); expect(error.toString()).toContain("CustomError: CustomMessage"); expect(error.stack).toContain(__filename); }); });