More additions to node.js based jasmine-runner

106 views
Skip to first unread message

James Carr

unread,
Nov 15, 2010, 7:14:40 PM11/15/10
to jasmi...@googlegroups.com
Hi All,

It still doesn't run specs within node.js (only client side ones) but
it's getting better. I recently merged some autospec style spec
running and also added some growl/libnotify support. This is all
installable via Node Package Manager: npm install jasmine.

See it in action here: http://vimeo.com/16868451

Github repo: https://github.com/jamescarr/jasmine-tool

More on the way... I really want to be able to do something like
"jasmine init --env node" and have specs configured to run in node.js
so I can finally start using jasmine as part of my workflow in
node.js. :)

Cheers,
James

James Carr

unread,
Nov 16, 2010, 1:21:11 AM11/16/10
to jasmi...@googlegroups.com
I take that back, see this for an overview: http://vimeo.com/16877035

orlin

unread,
Nov 16, 2010, 2:10:53 PM11/16/10
to Jasmine
Sweet! A little question about this:

> It still doesn't run specs within node.js (only client side ones) ...

My confusion has to do with project structure. Because, testing in the
browser means it's meant to run in the browser. Isn't the client-side
code usually in the public dir?

Would I use something like https://github.com/dsimard/ready.js to make
my javascripts public?
Or would I beam js to the client with https://github.com/kriszyp/transporter
or something else?

Is it common practice to keep the js source not in public/?

@orlin

James Carr

unread,
Nov 17, 2010, 11:25:00 PM11/17/10
to Jasmine
This is just a mistake on my part... I copied an older default project
structure from jasmine. I plan on updating it soon, but ideally you
can eventually use any project structure you want as it all will be
configurable. I'm also working at initializing project structures for
different environments, so you can do something like:

jasmine init --env=node
or
jasmine init --env=rhino

Much work is afoot! :)


Thanks,
James


On Nov 16, 2:10 pm, orlin <orlin.mo...@gmail.com> wrote:
> Sweet!  A little question about this:
>
> > It still doesn't run specs within node.js (only client side ones) ...
>
> My confusion has to do with project structure. Because, testing in the
> browser means it's meant to run in the browser.  Isn't the client-side
> code usually in the public dir?
>
> Would I use something likehttps://github.com/dsimard/ready.jsto make
> my javascripts public?
> Or would I beam js to the client withhttps://github.com/kriszyp/transporter

James H.

unread,
Dec 6, 2010, 10:29:15 AM12/6/10
to Jasmine
Hey James.

Are you aware of mhevery's efforts on a Node-based Jasmine runner
(https://github.com/mhevery/jasmine-node)? I've been hacking on his
all weekend, but yours looks a little cleaner. It might be nice to
combine efforts.

James

James Carr

unread,
Dec 6, 2010, 10:36:39 AM12/6/10
to jasmi...@googlegroups.com
I saw the node runner and really want to integrate it. Keep in mind my
runner is node.js based, but currently only runs client side specs. I
plan on integrating jasmine-node so that it can specify the
environment to run specs in, probably via a configuration setting in
jasmine.json. Init'ing a project would be a matter of:

jasmine init
jasmine init --env=node
jasmine init --env=rhino

The tool would then switch out runners based on an "environment"
configuration variable in the config file.

Also with the addition of jsdom and other things in node.js (with
jsdom one can use jquery within node) there's no reason we can't run
client side specs headlessly within node's runtime environment. :)

I have a newborn which naturally has reduced the amount of time I
spend on my open source projects so if anyone can lend a hand they are
more than welcome! :)


Thanks,
James

> --
> You received this message because you are subscribed to the Google Groups "Jasmine" group.
> To post to this group, send email to jasmi...@googlegroups.com.
> To unsubscribe from this group, send email to jasmine-js+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/jasmine-js?hl=en.
>
>

Reply all
Reply to author
Forward
0 new messages