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

Optional level summary#5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ShMcK merged 2 commits intomasterfromfeature/tests
May 30, 2020
Merged
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
NextNext commit
parse a step
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
  • Loading branch information
@ShMcK
ShMcK committedMay 30, 2020
commit32bd3049bddd77f4a4211ad216631f4ec21a8b20
41 changes: 40 additions & 1 deletiontests/parse.test.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,7 +19,7 @@ describe("parse", () => {
expect(result.summary).toEqual(expected.summary);
});

it("should parse a level witha summary", () => {
it("should parse a level withno steps", () => {
const md = `# Title

Description.
Expand DownExpand Up@@ -49,4 +49,43 @@ levels:
};
expect(result.levels).toEqual(expected.levels);
});

it("should parse a level with a step", () => {
const md = `# Title

Description.

## L1 Put Level's title here

> Level's summary: a short description of the level's content in one line.

Some text
`;

const yaml = `version: "0.1.0"
levels:
- id: L1
setup:
files: []
commits: []
solution:
files: []
commits: []
`;
const result = parse(md, yaml);
const expected = {
levels: [
{
id: "L1",
title: "Put Level's title here",
summary:
"Level's summary: a short description of the level's content in one line.",
content: "Some text",
setup: { files: [], commits: [] },
solution: { files: [], commits: [] },
},
],
};
expect(result.levels).toEqual(expected.levels);
});
});

[8]ページ先頭

©2009-2025 Movatter.jp