-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "scoreboard" test suite #479
Conversation
Sweet! You can see an example of output in Travis builds here:
|
FYI, I've updated the description to list the changes to our docs test script. I think this is good to merge as-is so that we can pull it into other branches. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just left one comment but otherwise looks good to me!
@@ -24,6 +24,7 @@ | |||
"@storybook/addon-options": "^3.2.6", | |||
"@storybook/react": "^3.2.12", | |||
"ava": "^0.23.0", | |||
"babel-core": "^6.26.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious why this was added? I don't see it being imported anywhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! I'll remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird... this isn't in the stories-to-markdown
branch anymore. GitHub bug??
This adds a new "scoreboard" package (which is not yet npm-publish-able) in
meta/scoreboard
that should generate a table of high-level checks for every one of our packages inmodules/primer-*
. Currently, the two checks are:{dir}/stories.js
, which currently doesn't match ones with{dir}/stories/*.js
, but we can change it).script/test-docs
passes when run in the package dir, regardless of whether the package's owntest
script is configured to run them. This is a way for us to have a better understanding of what's missing without just failing all of our tests (and builds) outright.New checks should be easy to add; just add new keys to this object literal in the form:
I've also refactored our docs test script in the following ways:
<% octicon "foo", class: "float-right" %>
(or in hash rocket form), which eliminates a bunch of false negatives.--verbose
.class_whitelist
field on theprimer
object in each package'spackage.json
, which is an array of minimatch-compatible globs. See 77f987f for some examples.To run it manually:
You can run the checks for a specific subset of packages by passing the directories in as positional arguments to
index.js
, e.g.node index.js ../../modules/primer-marketing*