Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

testem ci command won't work with prototype.js(1.6.3) #130

yokotaso opened this Issue Dec 13, 2012 · 3 comments


None yet
2 participants


when writing a test with prototype.js(version 1.6.3). testem version is 0.2.36

execute testem ci

result of testm ci as below:

# Launching Firefox
TAP version 13
ok 1 - Firefox "undefined"

# Launching Chrome
# ..
ok 2 - Chrome undefined
ok 3 - Chrome undefined

cause of issue

The cause of this issue is that the Array.ptototype.toJSON implemented in prototype.js returns invalid JSON object. And in testem, the test result handle as a string object.

the version of prototype.js is later than 1.7, this issue does't reproduce.
see: sstephenson/prototype@038a298

I think, This issue is not a testem bug, but also not prototype.js bug.
So, I want you to add known issue of manual.

how to avoid:

  • prepare *.js file. this file overwirte Array.ptototype.toJSON

I name this file compatible.js

    Array.prototype.toJSON = null;
  • add configuration file to include compatible.js after include ptototype.js
    "src_files" : [ "prototype.js",   "compatible.js" ]

and execute testem ci. it iworks well.


airportyh commented Dec 13, 2012

Thanks for the detailed report. I will try to make a workaround that protects against this if possible.


airportyh commented Dec 19, 2012

Alright, given JSON.stringify is a native api, nothing can be done it seems.

@airportyh airportyh closed this Dec 19, 2012

Thanks for adding testem manual! Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment