apisyouwonthate / style-guide

A shared and somewhat opinionated style guide for everyone to enjoy.
141 stars 20 forks source link

Add tests to validate rules work #19

Closed jamietanna closed 2 years ago

jamietanna commented 2 years ago

Would we be up for adding tests to our Spectral rules, similar to what we did in ie https://github.com/co-cddo/api-standards-linting/blob/main/spectral-ruleset-govuk-public/test/unsupported-media-type.test.js

This would be useful to give us a bit more control over the rules, allowing us to add them and have confidence it works before pushing it out for enforcement

More context at https://www.jvt.me/posts/2021/12/22/spectral-jest/

philsturgeon commented 2 years ago

You got it! The first job was getting this done and blogged: https://apisyouwonthate.com/blog/distribute-spectral-style-guides-with-npm

Now I’m going to write about testing, then another about versioning. I’ll take a look at these tests to help me get that done quicker. Thanks!

philsturgeon commented 2 years ago

Here we go! https://github.com/apisyouwonthate/style-guide/pull/21

github-actions[bot] commented 2 years ago

:tada: This issue has been resolved in version 1.1.3 :tada:

The release is available on:

Your semantic-release bot :package::rocket: