Using V8 command line and Jasmine stand alone -- a simple fix to pass V8

166 views
Skip to first unread message

dragonlist

unread,
Apr 2, 2011, 1:44:35 PM4/2/11
to Jasmine
Tried to use V8 command line with Jasmine stand alone 1.0.2, but got
an error.

[~/Downloads/jasmine-standalone-1.0.2/lib/jasmine-1.0.2]$ v8
jasmine.js jasmine-html.js
jasmine.js:52: TypeError: Cannot read property 'apply' of undefined
if (original.apply) {
^
TypeError: Cannot read property 'apply' of undefined
at Object.bindOriginal_ (jasmine.js:52:15)
at jasmine.js:62:30


Fixed by adding a condition check on line 52:

Change from:
if (original.apply) {

To:
if ( (orignial!=null) && original.apply ) {

The change fixed error.

Davis Frank

unread,
Apr 2, 2011, 5:49:34 PM4/2/11
to jasmi...@googlegroups.com, dragonlist
Which V8 command line are you using? Not Node.js?

--dwf


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


Charles Lowell

unread,
Apr 4, 2011, 8:08:49 AM4/4/11
to jasmi...@googlegroups.com, dragonlist
I've run into this in the past. There isn't any 'official' v8 executable, but homebrew does rename v8's test-shell to 'v8' and installs it in /usr/bin

It's uncommonjs at best.

The other possibility is that it's an older version of The Ruby Racer, which did ship with an executable named 'v8', but which was removed in order not to conflict with an official shell should they ever decide to create one.

cheers,
Charles
Reply all
Reply to author
Forward
0 new messages