You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2018/06/16 00:23:20 UTC

[GitHub] john-bodley closed pull request #5212: [cover] Fixing issue with Javascript code coverage

john-bodley closed pull request #5212: [cover] Fixing issue with Javascript code coverage
URL: https://github.com/apache/incubator-superset/pull/5212
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/superset/assets/package.json b/superset/assets/package.json
index 3ae55b41fa..15af52aa4c 100644
--- a/superset/assets/package.json
+++ b/superset/assets/package.json
@@ -8,8 +8,8 @@
     "test": "spec"
   },
   "scripts": {
-    "test": "mocha --require ignore-styles --compilers js:babel-core/register --require spec/helpers/browser.js --recursive spec/**/*_spec.*",
-    "cover": "babel-node node_modules/.bin/babel-istanbul cover _mocha -- --require ignore-styles spec/helpers/browser.js --recursive spec/**/*_spec.*",
+    "test": "mocha --compilers js:babel-core/register --require ignore-styles --require spec/helpers/browser.js --recursive spec/**/*_spec.*",
+    "cover": "babel-node node_modules/.bin/babel-istanbul cover _mocha -- --compilers js:babel-core/register --require ignore-styles --require spec/helpers/browser.js --recursive spec/**/*_spec.*",
     "dev": "webpack --mode=development --colors --progress --debug --watch",
     "prod": "node --max_old_space_size=4096 webpack --mode=production --colors --progress",
     "build": "webpack --mode=production --colors --progress",
diff --git a/superset/assets/spec/helpers/browser.js b/superset/assets/spec/helpers/browser.js
index 8c67f1c5d6..82ffa68abc 100644
--- a/superset/assets/spec/helpers/browser.js
+++ b/superset/assets/spec/helpers/browser.js
@@ -7,7 +7,14 @@ require('babel-register')({
   // NOTE: If `dynamic-import-node` is in .babelrc alongside
   // `syntax-dynamic-import` it breaks webpack's bundle splitting capability.
   // So only load during runtime on the node-side (in tests)
-  plugins: ['dynamic-import-node'],
+  plugins: [
+    'dynamic-import-node',
+  ],
+  presets: [
+    'airbnb',
+    'env',
+    'react',
+  ],
 });
 
 const exposedProperties = ['window', 'navigator', 'document'];


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org