Skip to content

Commit

Permalink
run unit tests on commit
Browse files Browse the repository at this point in the history
  • Loading branch information
OnkarRuikar committed Apr 26, 2023
1 parent 35269ad commit f235939
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 17 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pr-check_markdownlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@ jobs:
echo "::add-matcher::.github/workflows/markdownlint-problem-matcher.json"
files_to_lint="${{ env.DIFF_DOCUMENTS }}"
yarn markdownlint-cli2 ${files_to_lint}
echo "Linting front-matter"
node scripts/front-matter_linter.js ${files_to_lint}
1 change: 1 addition & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"markdownlint-cli2-fix",
"node scripts/front-matter_linter.js --fix true"
],
"tests/**/*.*": "yarn test:front-matter-linter",
"*.{svg,png,jpeg,jpg,gif}": "yarn filecheck"
}
16 changes: 0 additions & 16 deletions tests/front-matter_test_files/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,22 +68,6 @@
}
}
}
},
{
"if": {
"properties": { "slug": { "type": "string", "pattern": "^MDN/" } }
},
"then": {
"properties": {
"page-type": {
"enum": [
"landing-page",
"mdn-community-guide",
"mdn-writing-guide"
]
}
}
}
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion tests/front-matter_test_files/double_quotes.valid.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: 'some api: method() is "cool"'
title: "some api: method() is \"cool\""
short-title: method()
slug: Web/api/method
---
Expand Down

0 comments on commit f235939

Please sign in to comment.