You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@eternalsky, you can follow the discussion in #1221, but Sinon 2 does focus on newer browsers than Sinon 1. If you need support for older browsers then just use that. That being said, I don't think we have landet on a minimum version of IE to support, but then Sinon 2 is still in pre-release so that is our privilege 😄
As to your problem, defineGetter is not used at all in the source, but I see now that it is part of the packaged builds for the browser, which means it is from one of the packages we depend on:
$ git grep defineGetter | wc -l
0
$ ag -B10 defineGetter pkg/sinon.js
76-
5377-},{}],44:[function(require,module,exports){
5378-var colors = require('./colors');
5379-
5380-module['exports'] = function () {
5381-
5382- //
5383- // Extends prototype of native string object to allow for "foo".red syntax
5384- //
5385- var addProperty = function (color, func) {
5386: String.prototype.__defineGetter__(color, func);
5435- return colors.stylize(this, style);
5436- });
5437- });
5438-
5439- function applyTheme(theme) {
5440- //
5441- // Remark: This is a list of methods that exist
5442- // on String that you should not overwrite.
5443- //
5444- var stringPrototypeBlacklist = [
5445: '__defineGetter__', '__defineSetter__', '__looku
As can be seen it has something to do with colors, which was introduced in 4160e14 (PR #1203), so this is a regression. But if it is a regression worth fixing is another thing. If we land on IE11 as the min version (which I think is reasonable given that Sinon 1 support older versions), then we should't invest time in fixing it.
But ... if I were you I'd try to submit a small patch to the colors project that removes the deprecated __defineGetter__ in favor of Object.defineProperty and then get us to upgrade our version afterwards. That would fix this issue as well.
sinon 2.x is used in my project tests, and the tests fail in IE9 & IE10 because defineGetter is used. So does sinon 2.x just support IE >= 11 ?
The text was updated successfully, but these errors were encountered: