-
Notifications
You must be signed in to change notification settings - Fork 145
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
Show a helpful message when .all-contributorsrc doesn't exist. #23
Conversation
Could this be tested? |
LGTM |
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.
Hey @fadc80! Thanks a lot for taking this on!
I have a few nitpicks, but otherwise it looks pretty good :)
}); | ||
|
||
test.cb('Writing contributors in an absent configuration file throws a helpful error', t => { | ||
t.plan(1); |
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.
No need for t.plan
, the test will fail unless t.end
is called anyway.
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're right. Thanks!
configFile.readConfig(absentFile); | ||
}).message, | ||
expected | ||
); |
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 can simplify this like the following:
t.throws(() => {
configFile.readConfig(absentFile);
}, expected);
because t.throws
already takes an optional parameter allowing to verify the message of the error. See https://github.com/avajs/ava#throwsfunctionpromise-error-message
Thanks a lot @fadc80! :) |
I published this in v3.0.7. |
Implement first item of issue #6