Permalink
Browse files

Switch to babel-plugin-istanbul (#3701)

  • Loading branch information...
1 parent f0a7d14 commit 78359e663ac86aa9e3a6f5fc15fab65390e5a9bf @taion taion committed with timdorr Aug 4, 2016
Showing with 13 additions and 13 deletions.
  1. +4 −0 .babelrc
  2. +3 −9 karma.conf.js
  3. +3 −3 package.json
  4. +3 −1 tests.node.js
View
@@ -9,6 +9,10 @@
},
"es": {
"presets": ["es2015-loose-native-modules", "stage-1"]
+ },
+ "test": {
+ "presets": ["es2015-loose", "stage-1"],
+ "plugins": ["istanbul"]
}
}
}
View
@@ -1,4 +1,3 @@
-const path = require('path')
const webpack = require('webpack')
const projectName = require('./package').name
@@ -84,18 +83,13 @@ module.exports = config => {
devtool: 'cheap-module-inline-source-map',
module: {
loaders: [
- { test: /\.js$/, exclude: /node_modules/, loader: 'babel' },
- {
- test: /\.js$/,
- include: path.resolve('modules/'),
- exclude: /__tests__/,
- loader: 'isparta'
- }
+ { test: /\.js$/, exclude: /node_modules/, loader: 'babel' }
]
},
plugins: [
new webpack.DefinePlugin({
- 'process.env.NODE_ENV': JSON.stringify('test')
+ 'process.env.NODE_ENV': JSON.stringify('test'),
+ __DEV__: true
})
]
},
View
@@ -23,8 +23,8 @@
"lint": "eslint modules examples *.js",
"start": "cross-env BABEL_ENV=cjs node examples/server.js",
"test": "npm run lint && npm run test-node && npm run test-browser",
- "test-browser": "cross-env BABEL_ENV=cjs karma start",
- "test-node": "cross-env BABEL_ENV=cjs mocha --compilers js:babel-register tests.node.js"
+ "test-browser": "cross-env NODE_ENV=test karma start",
+ "test-node": "cross-env NODE_ENV=test mocha --compilers js:babel-register tests.node.js"
},
"authors": [
"Ryan Florence",
@@ -48,6 +48,7 @@
"babel-loader": "^6.2.4",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-dev-expression": "^0.2.1",
+ "babel-plugin-istanbul": "^1.0.3",
"babel-preset-es2015": "^6.9.0",
"babel-preset-es2015-loose": "^7.0.0",
"babel-preset-es2015-loose-native-modules": "^1.0.0",
@@ -65,7 +66,6 @@
"express": "^4.14.0",
"express-urlrewrite": "^1.2.0",
"gzip-size": "^3.0.0",
- "isparta-loader": "^2.0.0",
"karma": "^1.1.2",
"karma-browserstack-launcher": "^1.0.1",
"karma-chrome-launcher": "^1.0.1",
View
@@ -1 +1,3 @@
-import './modules/__tests__/serverRendering-test'
+global.__DEV__ = true
+
+require('./modules/__tests__/serverRendering-test')

0 comments on commit 78359e6

Please sign in to comment.