busterjs / buster

Abandoned - A powerful suite of automated test tools for JavaScript.
http://docs.busterjs.org
Other
448 stars 37 forks source link

IE <= 8 throwing error: Object doesn't support this action #400

Closed GCheung55 closed 10 years ago

GCheung55 commented 10 years ago

IE <= 8 has been throwing an error with buster-test and buster-static browser tests.

Object doesn't support this action

It's referring to delete this.sinon; and the like.

dkl-ppi commented 10 years ago

Unfortunately the delete statements are not the only problem in IE<=8, hence it will need a little bit more time to get it running.

dkl-ppi commented 10 years ago

Maybe it's not the final solution, but if you need a quick fix you can do the following:

  1. modify file browser-wiring.js, change the delete block at the end to the following:

    buster.sinon = sinon;
    try {
       delete this.define;
       delete this.when;
       delete this.async;
       delete this.platform;
       delete this._;
    } catch (e) {
       this['define'] = undefined;
       this['when'] = undefined;
       this['async'] = undefined;
       this['platform'] = undefined;
       this['_'] = undefined;
    }
  2. delete var buster = from the first line of the file amd-shim.js, so that the resulting line is:

    this.buster = this.buster || {};

For me the tests then run in IE7, IE8 and IE10. Nevertheless i will provide a proved fix asap.

dkl-ppi commented 10 years ago

Fixed by 1a5f65031c.