/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v5.100.2
test/RawModule.unittest.js
36 строк
1 KB
Alexander Akait
chore: eslint more rules (#19648)
03 июл 2025, 12:06
Не верифицирован
03 июл 2025, 12:06
87f648e
Код
Авторство
О чём код?
"use strict"; const path = require("path"); const RawModule = require("../lib/RawModule"); const RequestShortener = require("../lib/RequestShortener"); describe("RawModule", () => { const source = "sourceStr attribute"; const identifier = "identifierStr attribute"; const readableIdentifier = "readableIdentifierStr attribute"; const myRawModule = new RawModule(source, identifier, readableIdentifier); describe("identifier", () => { it("returns value for identifierStr attribute", () => { expect(myRawModule.identifier()).toBe("identifierStr attribute"); }); }); describe("size", () => { it('returns value for sourceStr attribute"s length property', () => { const sourceStrLength = myRawModule.sourceStr.length; expect(myRawModule.size()).toBe(sourceStrLength); }); }); describe("readableIdentifier", () => { it( 'returns result of calling provided requestShortener"s shorten method ' + "on readableIdentifierStr attribute", () => { const requestShortener = new RequestShortener(path.resolve()); expect(myRawModule.readableIdentifier(requestShortener)).toBeDefined(); } ); }); });