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

Feature/tests#4

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
Show file tree
Hide file tree
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
summary parse test
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
  • Loading branch information
@ShMcK
ShMcK committedMay 30, 2020
commitfa641d7a1f44e6440d6ca7532489446f2b39e1d7
9 changes: 8 additions & 1 deletionpackage.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -43,6 +43,13 @@
},
"jest": {
"preset": "ts-jest",
"testEnvironment": "node"
"verbose": true,
"testPathIgnorePatterns": [
"build"
],
"moduleFileExtensions": [
"js",
"ts"
]
}
}
2 changes: 1 addition & 1 deletionsrc/build.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,7 +12,7 @@ const workingDir = "tmp";

type TutorialContent = {};

function parseContent(md: string): TutorialContent {
exportfunction parseContent(md: string): TutorialContent {
let start: number = -1;
const parts: any[] = [];

Expand Down
20 changes: 20 additions & 0 deletionstests/parseMd.test.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
import { parseContent } from "../src/build";

describe("parse", () => {
it("should parse summary", () => {
const md = `# Insert Tutorial's Title here

Short description to be shown as a tutorial's subtitle.

`;

const result = parseContent(md);
const expected = {
summary: {
description: "Short description to be shown as a tutorial's subtitle.",
title: "Insert Tutorial's Title here",
},
};
expect(result).toEqual(expected);
});
});
2 changes: 1 addition & 1 deletiontsconfig.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,5 +22,5 @@
"removeComments": true,
"skipLibCheck": true
},
"exclude": [".vscode", "bin", "build", "test"]
"exclude": ["node_modules", ".vscode", "bin", "build", "tests"]
}

[8]ページ先頭

©2009-2025 Movatter.jp