Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

@yokotaso

Description

@yokotaso

issues

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: prototypejs/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

(function(){
    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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions