























@@ -5,7 +5,7 @@ describe("extractMarkdownFormatRuns", () => {
55it("returns the text unchanged when there is no markdown", () => {
66const { text, ranges } = extractMarkdownFormatRuns("plain text reply");
77expect(text).toBe("plain text reply");
8-expect(ranges).toEqual([]);
8+expect(ranges).toStrictEqual([]);
99});
10101111it("extracts a bold span", () => {
@@ -35,7 +35,7 @@ describe("extractMarkdownFormatRuns", () => {
3535it("respects word boundaries on single-underscore italics", () => {
3636const { text, ranges } = extractMarkdownFormatRuns("snake_case_var ok");
3737expect(text).toBe("snake_case_var ok");
38-expect(ranges).toEqual([]);
38+expect(ranges).toStrictEqual([]);
3939});
40404141it("treats single-underscore as italic when surrounded by whitespace", () => {
@@ -47,13 +47,13 @@ describe("extractMarkdownFormatRuns", () => {
4747it("does not treat empty marker pairs as formatting", () => {
4848const { text, ranges } = extractMarkdownFormatRuns("** ** literal");
4949expect(text).toBe("** ** literal");
50-expect(ranges).toEqual([]);
50+expect(ranges).toStrictEqual([]);
5151});
52525353it("leaves a lone asterisk alone", () => {
5454const { text, ranges } = extractMarkdownFormatRuns("price * quantity");
5555expect(text).toBe("price * quantity");
56-expect(ranges).toEqual([]);
56+expect(ranges).toStrictEqual([]);
5757});
58585959it("computes ranges in output coordinates, not input", () => {
@@ -88,7 +88,7 @@ describe("extractMarkdownFormatRuns", () => {
8888it("respects word boundaries on double-underscore underline", () => {
8989const { text, ranges } = extractMarkdownFormatRuns("def __init__(self):");
9090expect(text).toBe("def __init__(self):");
91-expect(ranges).toEqual([]);
91+expect(ranges).toStrictEqual([]);
9292});
93939494it("does not leak literal asterisks from triple markers when intent is unclear", () => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。