Prototype Unit Testing Framworks

2 views
Skip to first unread message

Daff

unread,
Nov 10, 2009, 2:51:43 PM11/10/09
to Prototype Mailing List
Hi All,

I have been trying to find a Javascript Unit testing framework that works with Prototype. I initially tried JsUnit, but it would appear that there is a namespace conflict with the asserts, because as soon as I include the prototype file, all the previously passing test fail, with errors.

I have searched the forums and did note that there is mention of unittest.js in some of them but have been unable to find said file. The posts where is was mentioned were also quite old.

I am really more interested in what others are using to test their Prototype created classes via unit testing.

Any thoughts of help would be most appreciated.
--
daff
SOFTWARE ENGINEER

andrew 'daff' niles | spider tracks ltd |  117a the square
po box 5203 | palmerston north 4441 | new zealand
P: +64 6 353 3395 | M: +64 210 255 8576 

Joe Athman

unread,
Nov 10, 2009, 4:34:41 PM11/10/09
to Prototype & script.aculo.us
We use JsUnit with prototype successfully. Could you post any
additional info about the errors you are getting? What version of
prototype/jsunit/browser are you using? I will say that JsUnit seems
to be basically on life support so you might want to look in to
something else. I've recently been looking in to the YUI Test library
which seems very full featured. http://developer.yahoo.com/yui/3/test/

Joe
> E: d...@spidertracks.co.nz <mailto:d...@spidertracks.co.nz>
>  W:www.spidertracks.com<http://www.spidertracks.com>

daff

unread,
Nov 10, 2009, 6:55:19 PM11/10/09
to Prototype & script.aculo.us
Thanks for that Joe,

Not sure what was happening with JsUnit, as every time I created tests
and then included prototype.js, all the previously successful tests
that were passing, and were not prototype dependant failed.

Anyway think I will take your suggestion and try out the YUI framework
and see how it goes.
Reply all
Reply to author
Forward
0 new messages