Skip to content

Commit e15cc9f

Browse files
committed
setup validate markdown tests
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parent 2587efd commit e15cc9f

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+
export function validateMarkdown(md: string): boolean {
2+
// validate title (#)
3+
// validate description
4+
// validate level
5+
// validate steps
6+
// validate codeblock formats
7+
8+
return false;
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 * as T from "../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)