Skip to content
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

Behavior on missing done #217

Closed
Marsup opened this issue Sep 22, 2014 · 7 comments
Closed

Behavior on missing done #217

Marsup opened this issue Sep 22, 2014 · 7 comments
Labels
feature New functionality or improvement

Comments

@Marsup
Copy link
Contributor

Marsup commented Sep 22, 2014

Hello,

I noticed people coming from mocha often forget to declare a done for synchronous code.

I know we don't intend to copy mocha but it might be useful to at least warn the user if no parameter is declared. It would be less verbose to accept both styles but I guess you did it on purpose ?

@geek geek added the request label Sep 22, 2014
@hueniverse
Copy link
Contributor

We consider testing sync code an anomaly and do require you define the argument and call it. I'm ok with a warning message, but don't think it is that important. But then again, I don't really want people to use lab... I'll let Wyatt make the call.

@Marsup
Copy link
Contributor Author

Marsup commented Sep 22, 2014

@hueniverse It appears to be the way to go when you're using hapi though, isn't it ?

@hueniverse
Copy link
Contributor

Sadly, yes. I saw the mocha guys trying to fix this. The main point is that this is no longer my problem :-)

@geek
Copy link
Member

geek commented Oct 7, 2014

I think a warning message is fine, we already warn for missing exports.lab

@Marsup
Copy link
Contributor Author

Marsup commented Oct 7, 2014

We also exit on missing exports.lab, is it desired here ? I'd think so but you tell me.

@geek
Copy link
Member

geek commented Oct 15, 2014

Ya, I think that makes sense to exit early with an error

Marsup added a commit to Marsup/lab that referenced this issue Oct 15, 2014
@geek geek closed this as completed in 7dec417 Oct 16, 2014
geek added a commit that referenced this issue Oct 16, 2014
Fix #217: throw on invalid function declaration
@Marsup Marsup added feature New functionality or improvement and removed request labels Sep 21, 2019
@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New functionality or improvement
Projects
None yet
Development

No branches or pull requests

3 participants