Thoughts on Steve Conover's pull requests & how to test Jasmine core

17 views
Skip to first unread message

Davis Frank

unread,
Mar 7, 2011, 4:11:00 PM3/7/11
to jasmine...@googlegroups.com
Steve's pending pull requests contain a bunch of things, but a couple of them are key: a way to run Jasmine core's specs in Node.js (two or three pieces here) and replacing the (dormant) jslint code with JSHint.  

Including these changes means that we can put in place a formal "how to verify your Jasmine core code before submission" process whether it's our own changes or a pull request.

We will consider your code viable for master if:
  1. Runner.html is green in Firefox, some webkit
  2. Node specs are green
  3. JSHint doesn't complain
We can make this formal in the Contributors' Guide (on the Github Wiki) and on the email lists. And it should make considering pull requests fairly easy.

If this sits well with folks, I'll get the relevant pull requests into master this week.

--dwf


Davis Frank

unread,
Mar 7, 2011, 4:29:23 PM3/7/11
to jasmine...@googlegroups.com
One last thing about this:

This approach implies that you need to have Node.js installed in order to do Jasmine Core development. Given the goals of the project, I'm fine with that.  Are you?

--dwf

Alex Chaffee

unread,
Mar 7, 2011, 6:26:31 PM3/7/11
to jasmine...@googlegroups.com, Davis Frank
On Mon, Mar 7, 2011 at 1:29 PM, Davis Frank <dwf...@pivotallabs.com> wrote:
> One last thing about this:
> This approach implies that you need to have Node.js installed in order to do
> Jasmine Core development. Given the goals of the project, I'm fine with
> that.  Are you?

I am. (Not that I'm on the Jasmine Core team or anything :-))

Just to be clear, this would mean the project is relying on
envjs/jsdom to provide reliable browser emulation... do we agree that
the state of the art in JS is now such that this actually possible? A
few years ago I would have been wary but I guess it's fine now.

I also guess that if ever the node tests break but the browser tests
don't then that'll be something interesting that we wouldn't have
otherwise known about.

- A

--
Alex Chaffee - al...@stinky.com - http://alexch.github.com
Stalk me: http://friendfeed.com/alexch | http://twitter.com/alexch |
http://alexch.tumblr.com

Davis Frank

unread,
Mar 7, 2011, 8:33:49 PM3/7/11
to Alex Chaffee, jasmine...@googlegroups.com
I'm working through Steve's requests now. Once the team likes the approach below we'll "unstick" the other requests for Jasmine Core.

Among next steps will be to test everything but the DOM-dependent code in Node & save the TrivialReporter specs for the Browser-based code. I'd rather not have to depend on all the flaky "DOM in JS" implementations there are...

--dwf

Steve Conover

unread,
Mar 8, 2011, 12:59:53 AM3/8/11
to jasmine...@googlegroups.com, Alex Chaffee, Davis Frank
> Just to be clear, this would mean the project is relying on
> envjs/jsdom to provide reliable browser emulation... do we agree that
> the state of the art in JS is now such that this actually possible?

It's only relying on it in the sense that it's what makes the
node-based suite passed. Note that it's still a requirement for the
same suite to pass in one (or more) browsers (whatever the core team
decides).

My workflow has been to have Chrome + Node/jsdom + jshint greens
before any commit. It takes maybe 30 seconds max to run all of those.

> I also guess that if ever the node tests break but the browser tests
> don't then that'll be something interesting that we wouldn't have
> otherwise known about.

I think your pull request should be rejected, or you should consider
yourself to be in a red state.

It could mean that there's a problem with jsdom that's about jsdom,
not jasmine, in which case you might need to just work around it to
get to green (i.e. don't run the test in node mode). But I think it's
safe to assume that that's unlikely to happen.

Rajan Agaskar

unread,
Mar 8, 2011, 7:29:11 AM3/8/11
to jasmine...@googlegroups.com, Steve Conover, Alex Chaffee, Davis Frank
I think having solid node support and requiring commits be tested against node is a good idea. Steve, are you using the jasmine gem, or jasmine and some node environment to run your tests?

Thanks!

Rajan 


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


Steve Conover

unread,
Mar 8, 2011, 10:00:43 AM3/8/11
to Rajan Agaskar, jasmine...@googlegroups.com, Alex Chaffee, Davis Frank
I'm ruby-free
Reply all
Reply to author
Forward
0 new messages