Skip to content

Commit 821316c

Browse files
committed
test(client-runtime): expect sourceOffset on CRLF fence segments
1 parent aa5d32d commit 821316c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎packages/client-runtime/src/pullRequestMarkdown.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,14 @@ describe("pull request body segmentation", () => {
8484
it("recognizes fences in a body with CRLF line endings", () => {
8585
const body = "```\r\nhttps://example.com/demo.mp4\r\n```";
8686
expect(splitPullRequestBody(body)).toEqual([
87-
{ id: "markdown:0", kind: "markdown", text: body },
87+
{ id: "markdown:0", kind: "markdown", text: body, sourceOffset: 0 },
8888
]);
8989
});
9090

9191
it("closes a CRLF fence, so a video after it still lifts out", () => {
9292
const code = '```html\r\n<video src="https://example.com/example.mp4"></video>\r\n```';
9393
expect(splitPullRequestBody(`${code}\r\n\r\nhttps://example.com/demo.mp4\r\n`)).toEqual([
94-
{ id: "markdown:0", kind: "markdown", text: code },
94+
{ id: "markdown:0", kind: "markdown", text: code, sourceOffset: 0 },
9595
{
9696
id: "attachment:1",
9797
kind: "attachment",

0 commit comments

Comments
 (0)