GruntBlanketMocha / grunt-blanket-mocha

Headless Blanket.js code coverage and Mocha testing via PhantomJS
MIT License
53 stars 37 forks source link

Need test suite for project #4

Open geekdave opened 11 years ago

geekdave commented 11 years ago
$ grunt test
Warning: Task "mocha" not found. Use --force to continue.

Aborted due to warnings.
laurelnaiad commented 11 years ago

If nobody's working on this I'll take a crack at it... LMK!

geekdave commented 11 years ago

@stu-salsbury nobody's working on this currently, so feel free to take a crack at it! I'm admittedly new to the grunt plugin scene, so I don't have much to offer in the way of advice. But feel free to chime in for feedback at any time we'll do our best to help out. Thanks for your offer to contribute!

Also if I may ask, in what sort of project are you using this plugin? We'd like to add a "used by" section for anyone who'd like to share this info.

laurelnaiad commented 11 years ago

Ok, I will get out my whip.

I'm tired of customizing my builds. Having started working with Google Closure Compiler, I found that the way I wanted to build and test was conspicuously challenging and it sort of pushed me over a hump with respect to grunt. In the past I've started apps from scratch and ended up with build processes that are slightly or significantly different each time. I'm fixin to change that.

Long story short... I'm considering using grunt-blanket-mocha in a bunch of node/grunt/closure javascript tools to make it easier to scaffold client-side Javascript apps with the following characteristics

Basically, something like a seed in a box (well, technically a node package) -- except that it won't be a seed but rather the tools you need so that you don't need a seed. To some extent an uber-task that strings together a whole slew of great grunt tasks into a whole that doesn't require a master's degree in grunt to set up.

Anyway -- most definitely not something to advertise just yet!

All that said, I'm pretty green with grunt plugin authoring, too. So far I think I know that I need to spawn grunt-blanket-mocha in order to be able to test its output!

P.S. BTW I noticed your blog and location. Please say "hi" to the Rockies for me. We just moved to San Diego in the winter from Dolores, CO. Miss it much -- talk about a different world (from the Four Corners to a beach city might as well be a different planet).

geekdave commented 11 years ago

Awesome! Looking forward to hearing more about the seed in a box idea. Have you checked out http://yeoman.io/ at all? Sounds like there could be some overlap. Maybe you wouldn't have to reinvent the wheel as much, if you wrote some plugins/generators for Yeoman. Just a thought.

Will say hi to the Rockies for you. They're a bit soggy lately as I'm sure you've heard, on account of the flooding. Quite the irony after all the draught and forest fires earlier this summer.

laurelnaiad commented 11 years ago

Since I wrote that my thinking has progressed/changed (of course).

I've kept yeoman in mind, for sure. I'm hoping to keep the majority of this business in grunt but if it gets anywhere I hope that yeoman generators will be able to generate different skeletons that make use of it. That'll be down the road a bit.

It's not so much a seed that I have in mind but a kind of "task overlord" that should help make it easier to have tasks rely on the context that each one brings to a gruntfile.... hard to explain right now, it's still not yet even in its infancy.

But -- for example, when you save a certain file in your app, you might want to run the tests that apply to that file and to any file for which that file is a dependency.... unit test only that which is affected by the file you saved. My task "overlord" thingy would help you with causing these ripples to pass through several tasks carrying context along the way and behaving differently if you are in different modes of development. A chunk of it is in systemizing what happens when grunt-contrib-watch fires events and how tasks relate to each other.

This all relates back to grunt-blanket-mocha because the grep feature of mocha doesn't always fit the bill for selecting which test/tests to run and editing the html for a test runner from a grunt task is ugly. :)