refactor: move wrap text multiline function into fmt module (#4572)

Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
This commit is contained in:
Alexandr Garbuzov
2025-10-14 21:11:23 +03:00
committed by GitHub
co-authored by Alexandr
parent b9c3bf6251
commit ab53e3052d
8 changed files with 50 additions and 51 deletions
+3 -6
View File
@@ -3,12 +3,8 @@
import { describe, expect, it } from "@jest/globals";
import { queryByTestId } from "@testing-library/dom";
import "@testing-library/jest-dom";
import {
encodeHTML,
parseBoolean,
renderError,
wrapTextMultiline,
} from "../src/common/utils.js";
import { encodeHTML, parseBoolean, renderError } from "../src/common/utils.js";
import { wrapTextMultiline } from "../src/common/fmt.js";
describe("Test utils.js", () => {
it("should test parseBoolean", () => {
@@ -25,6 +21,7 @@ describe("Test utils.js", () => {
expect(parseBoolean("1")).toBe(undefined);
expect(parseBoolean("0")).toBe(undefined);
expect(parseBoolean("")).toBe(undefined);
// @ts-ignore
expect(parseBoolean(undefined)).toBe(undefined);
});