-
Notifications
You must be signed in to change notification settings - Fork 627
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
Use lab and Code for testing #215
Comments
FYI, that's not default behavior for Mocha either. Here's the culprit: https://github.com/metalsmith/metalsmith/blob/master/test/mocha.opts#L4 If you want to submit a PR to remove that I'd personally be in favor of it. |
incoming!! |
Make it in a separate PR. I want to double-check that no one else has any objections to removing that option before merging it, so it'd be good to have a separate PR to point people to. |
Nopro! |
Regarding this proposal, I will say I'm a bit skeptical. Mocha is a pretty popular test framework with a large ecosystem and strong community support, and I'm not quite sure I see any huge benefits to switching to Lab. Code looks pretty nice though, and I don't think I'd personally mind using that in our existing tests. Although... one thing I did notice that Lab might give us is support for source maps in our test coverage. (Which we will probably want for #214). Istanbul is working on support for that, but it doesn't seem fully baked yet: gotwarlost/istanbul#212 |
I see your points. I let you decide. There is no urgency, and it's just a suggetsion :) |
FYI, Mocha also supports a done callback for asynchronous tests. It also supports Promises, which is super-nice IMO. (You can return a promise from the test case, and the test will either fail or pass once the promise resolves.) |
I knew for the async callback. But didn't know about the promise. |
I'm proposing to migrate our testing to use
lab
test runner andcode
asserter.Lab come with builtin coverage, beside on failing test doesnt terminate the testing. (hence you could detect several failing test. -> that was a pain pouring some es6 into metalsmith).
Code assertions are also more expressive, and capture more semantics.
I can take of this, should you agree :)
The text was updated successfully, but these errors were encountered: