/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v5.106.1
test/AbstractMethodError.unittest.js
27 строк
668 B
Alexander Akait
refactor: use `eslint-config-webpack` (#19645)
02 июл 2025, 15:10
Не верифицирован
02 июл 2025, 15:10
02a1d22
Код
Авторство
О чём код?
"use strict"; const AbstractMethodError = require("../lib/AbstractMethodError"); describe("WebpackError", () => { class Foo { abstractMethod() { return new AbstractMethodError(); } } class Child extends Foo {} const expectedMessage = "Abstract method $1. Must be overridden."; it("should construct message with caller info", () => { const fooClassError = new Foo().abstractMethod(); const childClassError = new Child().abstractMethod(); expect(fooClassError.message).toBe( expectedMessage.replace("$1", "Foo.abstractMethod") ); expect(childClassError.message).toBe( expectedMessage.replace("$1", "Child.abstractMethod") ); }); });