Skip to content

Commit

Permalink
chore(test-helper): setup promise polyfill for browser testing
Browse files Browse the repository at this point in the history
relates to ReactiveX#998
  • Loading branch information
kwonoj committed Jan 8, 2016
1 parent 9bd7649 commit 447143d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ module.exports = function (config) {
browserName: 'firefox',
version: 'dev'
},
sl_ie11: {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 8.1',
version: '11'
},
sl_safari9: {
base: 'SauceLabs',
browserName: 'safari',
Expand Down
7 changes: 7 additions & 0 deletions spec/helpers/test-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,13 @@ afterEach(function () {
});

global.__root__ = root;

//setup promise polyfill for browsers does not supports it
if (!(root.Promise || root.Rx && root.Rx.config && root.Rx.config.Promise)) {
Rx.config = {
Promise: require('promise')
};
}
})();

global.lowerCaseO = function lowerCaseO() {
Expand Down

0 comments on commit 447143d

Please sign in to comment.