Skip to content

Conversation

jeeyyy
Copy link
Collaborator

@jeeyyy jeeyyy commented May 14, 2019

This PR does the below:

  • Adds jest, for testing & assertions.
  • Tests do the below:
    • checks if rules exist.
    • checks for existence of mandatory frontmatter attributes.
    • checks conditionally for existence of optional frontmatter attributes based on rule_type.
    • checks for all mandatory h2 headings.
    • checks for all mandatory h3 headings.
  • Fixes all the rules markdown files, which were highlighted to have issues.
  • Wired up CircleCI to catch validation errors on pull requests.

Closes issue:

@jeeyyy jeeyyy added the Chore label May 14, 2019
@jeeyyy jeeyyy requested a review from WilcoFiers May 14, 2019 10:58
@jeeyyy jeeyyy self-assigned this May 15, 2019
@jeeyyy jeeyyy requested a review from WilcoFiers May 15, 2019 14:52
@jeeyyy jeeyyy mentioned this pull request May 15, 2019
3 tasks
Copy link
Member

@WilcoFiers WilcoFiers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better. Thanks Jey!

rules.forEach(ruleData => {
const { filename } = ruleData
describe(filename, () => {
describe(groupName, () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh bummer. Looks like this nesting describe doesn't work in Jest. :( Might as well put this into a single describe then.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeeyyy jeeyyy merged commit 1f9f4f0 into develop May 18, 2019
@jeeyyy jeeyyy deleted the validation-of-rules branch May 18, 2019 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants