Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4a21eec

Browse files
committed
setup summary parse tests
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parent5222806 commit4a21eec

File tree

1 file changed

+36
-1
lines changed

1 file changed

+36
-1
lines changed

‎tests/parse.test.ts

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,45 @@ But not including this line.
191191
title:"Put Level's title here",
192192
summary:"Some text.",
193193
content:"Some text.\n\nBut not including this line.",
194+
steps:[],
195+
},
196+
],
197+
};
198+
expect(result.levels[0]).toEqual(expected.levels[0]);
199+
});
200+
201+
it("should truncate a level with an empty summary",()=>{
202+
constmd=`# Title
203+
204+
Description.
205+
206+
## L1 Put Level's title here
207+
208+
>
209+
210+
Some text.
211+
212+
But not including this line.
213+
`;
214+
215+
constskeleton={levels:[{id:"L1"}]};
216+
constresult=parse({
217+
text:md,
218+
skeleton,
219+
commits:{},
220+
});
221+
constexpected={
222+
levels:[
223+
{
224+
id:"L1",
225+
title:"Put Level's title here",
226+
summary:"Some text.",
227+
content:"Some text.\n\nBut not including this line.",
228+
steps:[],
194229
},
195230
],
196231
};
197-
expect(result.levels[0].summary).toEqual("Some text.");
232+
expect(result.levels[0]).toEqual(expected.levels[0]);
198233
});
199234

200235
it("should match line breaks with double line breaks for proper spacing",()=>{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp