-
-
Notifications
You must be signed in to change notification settings - Fork 299
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
Up coverage result on coveralls #504
Conversation
Hi, your test need some work to be of better quality. First of all, review our testing guidelines.
describe('#shift()', function () {
it('return the first item in the conflict lists');
it('remove the first item');
});
Don't use Last thing, try putting less setup code in each |
@mazerte Any chance you can address the precedent comments? |
I'm sorry Simom, I didn't have time to do this. But I can fix my unit test for follow your guidelines. I don't undertand how to test Inquirer responses with Sinon.js. I follow your test method in Inquirer repository. https://github.com/SBoudrias/Inquirer.js/blob/master/test/specs/inquirer.js#L42 |
Yes, I test it this way in Inquirer because I test the Inquirer implementation. In the context of Yeoman, you test Yeoman, not Inquirer and the readline. As so, you only need to mock (override) the Adapter prompt method for your own mocked one. For example: beforeEach(function () {
this.promptReturns = { status: 'force' };
mockAdapter.prompt = function (questions, cb) {
cb(this.promptReturns);
});
}); |
ping :) |
@mazerte still around? |
Closing for lack for lack of response. We would be happy to reopen if you get interested again though :) |
Leave it open, I'll take care of the fixes myself if we don't get them before I get there. |
Can we get this landed or closed? |
Ok, that's done - thanks for the initial work @mazerte, it's been very useful! |
Everything is in title.