From c2146ce165a628e910aa13f5581dd692c33d2ab0 Mon Sep 17 00:00:00 2001 From: Daniel Huigens Date: Mon, 7 Dec 2020 21:02:18 +0100 Subject: [PATCH] Fix CI for older environments --- rollup.config.js | 2 +- test/unittests.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/rollup.config.js b/rollup.config.js index c1143978..985580c0 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -93,7 +93,7 @@ export default Object.assign([ { input: 'test/unittests.js', output: [ - { file: 'test/lib/unittests-bundle.js', format: 'es', sourcemap: true }, + { file: 'test/lib/unittests-bundle.js', format: 'es', intro, sourcemap: true }, ], inlineDynamicImports: true, plugins: [ diff --git a/test/unittests.js b/test/unittests.js index 91f9a8fb..1296da9c 100644 --- a/test/unittests.js +++ b/test/unittests.js @@ -1,3 +1,5 @@ +(typeof window !== 'undefined' ? window : global).globalThis = (typeof window !== 'undefined' ? window : global); + (typeof window !== 'undefined' ? window : global).resolves = function(val) { return new Promise(function(res) { res(val); }); };