Skip to content
This repository has been archived by the owner on Jul 21, 2021. It is now read-only.

Clean up test documentation and add tests #264

Merged
merged 4 commits into from
Jan 14, 2016
Merged

Clean up test documentation and add tests #264

merged 4 commits into from
Jan 14, 2016

Conversation

TimAbraldes
Copy link
Contributor

No description provided.

@mention-bot
Copy link

By analyzing the blame information on this pull request, we identified @brendandahl, @marco-c and @digitarald to be potential reviewers

Tim Abraldes added 2 commits January 12, 2016 12:57
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.
@TimAbraldes TimAbraldes changed the title WIP Flesh out our tests Flesh out our tests Jan 12, 2016
@TimAbraldes
Copy link
Contributor Author

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

@TimAbraldes TimAbraldes changed the title Flesh out our tests Clean up test documentation and add tests Jan 12, 2016
@@ -462,3 +462,8 @@ export default {
buildStatus,
buildIndex,
};

const test = {
Copy link
Contributor

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.

https://github.com/jhnns/rewire

Copy link
Contributor Author

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.

Copy link
Contributor Author

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

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

I've filed #272.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks!

marco-c added a commit that referenced this pull request Jan 14, 2016
Clean up test documentation and add tests
@marco-c marco-c merged commit 1f3ca70 into master Jan 14, 2016
@TimAbraldes TimAbraldes deleted the moretests branch January 14, 2016 21:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants