breaking Jasmine with undefined

4 views
Skip to first unread message

Charlie

unread,
Nov 19, 2009, 12:33:42 AM11/19/09
to Jasmine
Hi all,

I came across an instance today where the variable "undefined" had
actually been defined to a value, and it prevented Jasmine from
executing successfully. Since undefined is just a variable, it can be
defined to whatever someone likes, such as:

var undefined = 5;

I would suggest having a line like:

var undefined;

somewhere in Jasmine such that it is in scope of the rest of the
framework to prevent an error like this from impacting Jasmine.

Thanks!

Charlie Meyer

Department of Computer Science
University of Illinois Urbana-Champaign

Christian Williams

unread,
Nov 26, 2009, 11:18:02 AM11/26/09
to jasmi...@googlegroups.com, jasmine...@googlegroups.com
Thanks for the suggestion Charlie!  Give this branch a try if you'd like:

http://github.com/pivotal/jasmine/commits/safe-undefined

jasmine-js-dev: I'll merge it to master this weekend if there are no objections.

--Xian


--

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=.



Christian Williams

unread,
Nov 27, 2009, 3:32:32 PM11/27/09
to jasmi...@googlegroups.com, jasmine...@googlegroups.com
Merged onto pivotal master.

--Xian
Reply all
Reply to author
Forward
0 new messages