Comments (6)
From #32:
We could, though, look at the number of things that depend on Tape vs the things that depend on Mocha and decide whether the gulf is so vast that it's an obvious choice.
@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 assert
does the job, but it's more taxing to read down a page and find what's being asserted - you've gotta read through each line of code to get the context you need to understand why assert(obj1 == result)
. Easier understood as obj.must.be.true()
.
from dendritic.
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 babel-node
do it's thing in there too.
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.
Another discussion that kinda gets lost in this, is using fluent assertions. I love em. Yeah assert does the job, but it's more taxing to read down a page and find what's being asserted - you've gotta read through each line of code to get the context you need to understand why assert(obj1 == result). Easier understood as obj.must.be.true().
I find the exact opposite. I like that assert has a nice simple syntax that's unambiguous. In your example it would actually be assert(obj1)
as equivalent to obj1.must.be.true()
Or potentially:
assert.deepEqual(obj1, result)
and obj1.must.eq(result)
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.
from dendritic.
i think it's worth separating the test runner and assertions libs discussions. chaijs
can give you any style you like. or you can bring your own. i find that's one of the strengths of mocha
as it doesn't lock you in with a specific assertions library.
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.
from dendritic.
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.
from dendritic.
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 :)
from dendritic.
Bye Tape. I guess you just didn't stick.
from dendritic.
Related Issues (20)
- "utils" vs "lib" HOT 3
- Route paths using filenames as relative base HOT 7
- Build analytics HOT 5
- Revision id is not checked when updating HOT 1
- "definitions" schema returned via /schema HOT 4
- /schemas folder location HOT 3
- Add the soft-delete option for models HOT 3
- Last build time + commit HOT 3
- Validation errors do not show fieldname HOT 2
- Validation errors difficult to match to form inputs HOT 6
- Docker automation package
- Move the redbeard specific code from boilerplate into dependencies
- v5 Validations
- thinky.dbReady is borked in docker
- Tests are flaky due to random project/resource names
- app-module-path must go
- Update deps
- createdAt/updatedAt as default schema/model fields HOT 7
- Base Controller .update uses this.find which can be overwritten. HOT 4
- Interview partners for research about communication in GitHub projects wanted
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dendritic.