-
Notifications
You must be signed in to change notification settings - Fork 53
Clean up test documentation and add tests #264
Conversation
By analyzing the blame information on this pull request, we identified @brendandahl, @marco-c and @digitarald to be potential reviewers |
Moving intern config files to a dedicated config folder.
Adding links to test documentation and cleaning up the file comments to hopefully make it easier to figure out how to write/extend tests.
I removed the WIP tag from the title. There's lots more to do (i.e. tons more tests that can be written) but this can land piecemeal |
@@ -462,3 +462,8 @@ export default { | |||
buildStatus, | |||
buildIndex, | |||
}; | |||
|
|||
const test = { |
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.
You could try using rewire
to avoid exporting internal functions.
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.
Rewire looks super cool! I'll update this to use 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.
It turns out that rewire doesn't work with babel: jhnns/rewire#62
However there is a babel plugin that might work for this use case: https://github.com/speedskater/babel-plugin-rewire
I'm giving it a shot now
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.
The babel plugin doesn't work with babel 6+:
speedskater/babel-plugin-rewire#71
At this point I'm thinking that exporting the items we want to test via a non-default export makes the most sense.
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.
OK, let's file a follow-up to use rewire
or babel-plugin-rewire
once it's feasible.
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.
I've filed #272.
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.
Thanks!
Clean up test documentation and add tests
No description provided.