nevir / groc

Documentation generation, in the spirit of literate programming.
http://nevir.github.com/groc/
MIT License
580 stars 131 forks source link

Tests #5

Open nevir opened 12 years ago

nevir commented 12 years ago

They'd be nice, wouldn't they?

sjorek commented 10 years ago

… not just a nice to have maintenance-issue, I assume this is a :bug: …

When larger pull-requests will come in (and believe me, I'd really like to offer some of those, see https://github.com/sjorek/groc/compare/feature-collapsible-columns or https://github.com/sjorek/groc/compare/nevir:master...master), the lack of tests will certainly cause some headaches. I still have some time left to spent on this project (round about 7 days, powered by personal interest and customers I work for), so maybe you're interested in discussing how to get started here and share the work …

The initial question that comes to my mind is, which way to go ?

kmdavis commented 10 years ago

I'd argue for jasmine. I'd also argue using grunt + jasmine + Istanbul (code coverage)

Take a look at gilt/kairos for a project that uses this set up

I've been considering making this change also

Sent from my iPhone

On Sep 18, 2013, at 1:25 PM, Stephan Jorek notifications@github.com wrote:

… not just nice, I assume this is a …

When larger pull-requests will come in (and believe me, I'd really like to offer some of those, see https://github.com/sjorek/groc/compare/feature-collapsible-columns or sjorek@nevir:master...master), the lack of tests will certainly cause some headaches. I still have some time left to spent on this project (round about 7 days, powered by personal interest and customers I work for), so maybe you're interested in discussing how to get started here and share the work …

The initial question that comes to my mind is, which way to go ?

raw coffee as in https://github.com/jashkenas/coffee-script/blob/master/Cakefile#L163 jasmine-specs nodeunit Something I'm not yet aware of ? — Reply to this email directly or view it on GitHub.

sjorek commented 10 years ago

I will dig into that and give you my feedback tomorrow, as it's time to have lunch and a couch here …

… I think this time it's certainly a good idea to share the work, and I won't/can't/wouldn't ever stop you from starting right away as soon as you have time. If you do so, I'll hop on the train if it's running …

sjorek commented 10 years ago

But :+1: for jasmine anyway !

sjorek commented 10 years ago

So back again … I've looked into gilt/kairos' setup with the focus on grunt + jasmine + istanbul

To be honest, I can't see the big advantage of grunt in this trio, that could not achieved by a simple Cakefile + jasmine + istanbul … so I'm stuck at the grunt-dependency. Why grunt ? … Do you plan to do more (later on) ? Does this tool bring something you/we really need or want ? (Watch files, concatenation or the like ? …) Please, don't get me wrong - I like grunt - it's a good choice to automate node.js-related build processes. But sometimes it's a little bit of over-engineering … otherwise, if you like it or got used to it, I won't insist on the Cakefile approach.

With instanbul I didn't work in the context of (raw) coffee-script yet - I thought it has problems with reporting line-numbers in coffee-sourcefiles => https://github.com/gotwarlost/istanbul/issues/43. But I didn't try it out yet. What I did with coffee-scripts is https://github.com/benbria/coffee-coverage which has a grunt-task too https://github.com/FredrikAppelros/grunt-coffee-coverage

Nevertheless still a :+1: for grunt + jasmine + istanbul … everything is better, than having no tests at all :smirk: … so ping my back if I can do something …

kmdavis commented 10 years ago

my main reason for wanting grunt is purely selfish: I'm used to grunt, and we're using it here at Gilt for several of our open source javascript projects :smile_cat:

I haven't tried istanbul with coffeescript before, so I didn't know it messes up the line numbers. It probably instruments the compiled js file

sjorek commented 10 years ago

… btw. https://github.com/gilt/kairos misses coffee-script in the npm-dependencies, as you've got a Gruntfile.coffee … :blush: