From e5e9a3819e1a909cfe67f9d4e9be164418a678b9 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Thu, 21 Apr 2016 08:09:40 +0100 Subject: [PATCH] Load babel-polyfill in tests Object.values() isn't available natively, so use polyfill for it. --- package.json | 1 + test/skinned-sdk.js | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/package.json b/package.json index c956560739..731ae6cfbb 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "babel": "^5.8.23", "babel-core": "^5.8.38", "babel-loader": "^5.4.0", + "babel-polyfill": "^6.5.0", "expect": "^1.16.0", "json-loader": "^0.5.3", "karma": "^0.13.22", diff --git a/test/skinned-sdk.js b/test/skinned-sdk.js index 5d3526b797..869902dcf6 100644 --- a/test/skinned-sdk.js +++ b/test/skinned-sdk.js @@ -5,6 +5,14 @@ * application to provide */ +/* this is a convenient place to ensure we load the compatibility libraries we expect our + * app to provide + */ + +// for ES6 stuff like startsWith() and Object.values() that babel doesn't do by +// default +require('babel-polyfill'); + var sdk = require("../src/index"); var skin = require('../src/component-index.js');