Skip to content

Commit

Permalink
Remove polyfill for Promise
Browse files Browse the repository at this point in the history
The ramifications of letting the Promise polyfill enter the main
Sinon code escaped me at the time I reviewed sinonjs#1211, but it struck me
when reviewing sinonjs#1215 that had similar issues. In short:

    having the polyfill bundled with Sinon will lead to false
    negatives: running tests using Sinon will then give
    the impression that code works on platforms that does not
    support the features that were polyfilled.

This reverts the introduction of `native-promise-only` in the main
code and moves it to its proper place: the test code.
  • Loading branch information
fatso83 committed Dec 31, 2016
1 parent 1c8c7ab commit a0475a8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion lib/sinon/behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
var extend = require("./extend");
var functionName = require("./util/core/function-name");
var valueToString = require("./util/core/value-to-string");
var Promise = require("native-promise-only");

var slice = Array.prototype.slice;
var join = Array.prototype.join;
Expand Down
1 change: 1 addition & 0 deletions test/stub-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ var createInstance = require("../lib/sinon/util/core/create");
var assert = referee.assert;
var refute = referee.refute;
var fail = referee.fail;
var Promise = require("native-promise-only"); // eslint-disable-line no-unused-vars

describe("stub", function () {
it("is spy", function () {
Expand Down

0 comments on commit a0475a8

Please sign in to comment.