-
Notifications
You must be signed in to change notification settings - Fork 1
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
blue-tape vs. mocha #37
Comments
From #32:
@davidbanham Do you mean "things" internally? Or we talking community wide? I think we should roll with Mocha as we never had any problems with it as far as I know? It felt like Tape came out swinging and we used it on a couple of projects, but pretty quickly went back to using Mocha for a variety of reasons. I don't think Tape is bad, it was kinda cool to use on a couple of projects - it's really minimal, that's cool - but it did seem like the internet was arguing about Mochas global vars/functions etc.. when I don't remember them being a problem? Another discussion that kinda gets lost in this, is using fluent assertions. I love em. Yeah |
I'm talking community wide. The Problem With Mocha that caused me to go to Tape in the first place is how much of a sackpain it is to compose it with things like istanbul. They both want to control the binary that runs things. With enough dicking around with gulp and/or command line flags you can make them play nicely with each other, but it takes some doing. I shudder to think what would happen if you tried to make The crux is that control of the root level binary is a powerful tool, but it's a big hassle when multiple things demand to use it. Any time we can jettison a tool that wants it in favour of one that doesn't, we should take a good hard look. That said, it seems to have transpired that the pain of Tape'ing is worse than the pain of smashing Mocha into Istanbul into Babel and picking through the wreckage.
I find the exact opposite. I like that assert has a nice simple syntax that's unambiguous. In your example it would actually be Or potentially:
Either way, they both capture exactly the same amount of information in a single line, requiring the same amount of spelunking through the state of the rest of the function. Assert, however, does it without monkeypatching the global prototype of All The Things. It's also part of stdlib, so it's one less (or in the case of must, 8 less, http://npm.anvaka.com/#/view/2d/must) vector by which we can be left-padded. |
i think it's worth separating the test runner and assertions libs discussions. i personally like mocha because it provides me with a robust and standard BDD interface for tests. I know what to do with it and when I'm done, i'm 99% sure that the next dev will know what to do with it as well. as for bundling mocha with istanbul, it might be confusing a bit, but it is solvable in 100% of cases, with babel or without. I do it all the time. Just ask and I'll give you a working solution. |
I've done it before too, so I know it's possible. It's just such a pain in the neck. If there was another test framework that was equally productive that didn't demand a binary, I wanted to use it. I thought Tape might be that, but it turns out not to be. C'est la vie. Tape is dead. Long live Mocha. |
i don't really see the pain tbh. it's just an one line in your "scripts" section. besides we're building a generator, right? we solve it once here and then every time someone generates a new project it will be automatically setup for them :) |
Bye Tape. I guess you just didn't stick. |
I've noticed that you use blue-tape as the default testing framework. why not mocha? it's a more widely used solution by a huge margin with a wastly more options for extensions. and it supports promises out of the box too. not to say that it also supports immensely useful things like global before/after hooks and spits out better BDD specs
The text was updated successfully, but these errors were encountered: