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

Commite15cc9f

Browse files
committed
setup validate markdown tests
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parent2587efd commite15cc9f

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

‎src/utils/validateMarkdown.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
exportfunctionvalidateMarkdown(md:string):boolean{
2+
// validate title (#)
3+
// validate description
4+
// validate level
5+
// validate steps
6+
// validate codeblock formats
7+
8+
returnfalse;
9+
}

‎tests/markdown.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import*asTfrom"../typings/tutorial";
2+
import{validateMarkdown}from"../src/utils/validateMarkdown";
3+
4+
describe("validate markdown",()=>{
5+
it.todo("should return false if missing a summary title (#)");
6+
it.todo("should return false if contains multiple `#` headers");
7+
it.todo("should return false if missing a summary description");
8+
it.todo("should return false if `##` doesn't preface a level");
9+
it.todo("should return false if `###` doesn't preface a step");
10+
it.todo("should return true for valid markdown");
11+
});

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp