Format: apply oxfmt fixes
This commit is contained in:
committed by
Peter Steinberger
parent
8c1e6a82b2
commit
232c512502
@@ -16,13 +16,9 @@ describe("markdownToSignalText", () => {
|
||||
});
|
||||
|
||||
it("renders links as label plus url when needed", () => {
|
||||
const res = markdownToSignalText(
|
||||
"see [docs](https://example.com) and https://example.com",
|
||||
);
|
||||
const res = markdownToSignalText("see [docs](https://example.com) and https://example.com");
|
||||
|
||||
expect(res.text).toBe(
|
||||
"see docs (https://example.com) and https://example.com",
|
||||
);
|
||||
expect(res.text).toBe("see docs (https://example.com) and https://example.com");
|
||||
expect(res.styles).toEqual([]);
|
||||
});
|
||||
|
||||
@@ -34,18 +30,14 @@ describe("markdownToSignalText", () => {
|
||||
});
|
||||
|
||||
it("renders fenced code blocks with monospaced styles", () => {
|
||||
const res = markdownToSignalText(
|
||||
"before\n\n```\nconst x = 1;\n```\n\nafter",
|
||||
);
|
||||
const res = markdownToSignalText("before\n\n```\nconst x = 1;\n```\n\nafter");
|
||||
|
||||
const prefix = "before\n\n";
|
||||
const code = "const x = 1;\n";
|
||||
const suffix = "\nafter";
|
||||
|
||||
expect(res.text).toBe(`${prefix}${code}${suffix}`);
|
||||
expect(res.styles).toEqual([
|
||||
{ start: prefix.length, length: code.length, style: "MONOSPACE" },
|
||||
]);
|
||||
expect(res.styles).toEqual([{ start: prefix.length, length: code.length, style: "MONOSPACE" }]);
|
||||
});
|
||||
|
||||
it("renders lists without extra block markup", () => {
|
||||
@@ -60,8 +52,6 @@ describe("markdownToSignalText", () => {
|
||||
|
||||
const prefix = "😀 ";
|
||||
expect(res.text).toBe(`${prefix}bold`);
|
||||
expect(res.styles).toEqual([
|
||||
{ start: prefix.length, length: 4, style: "BOLD" },
|
||||
]);
|
||||
expect(res.styles).toEqual([{ start: prefix.length, length: 4, style: "BOLD" }]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user