From be7973b904ed2eeb9cbb83c82a48703129bb599d Mon Sep 17 00:00:00 2001 From: Bart Butler Date: Thu, 15 Feb 2018 21:28:26 -0800 Subject: [PATCH] add polyfills for test bundle --- test/unittests.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/unittests.js b/test/unittests.js index 2e07de4b..9c1c00a6 100644 --- a/test/unittests.js +++ b/test/unittests.js @@ -1,3 +1,11 @@ +// Old browser polyfills +if (typeof Symbol === 'undefined') { + require('core-js/fn/symbol'); +} +if (typeof Promise === 'undefined') { + require('core-js/fn/promise'); +} + (typeof window !== 'undefined' ? window : global).resolves = function(val) { return new Promise(function(res) { res(val); }); }; @@ -14,7 +22,6 @@ tests(); - //if (typeof window !== 'undefined') { afterEach(function () { window.scrollTo(0, document.body.scrollHeight); }); } if (options.afterEach) { afterEach(options.afterEach); } if (options.after) { after(options.after); } });