Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

Update Infra #969 - Replace isparta with istanbul #1011

Merged
merged 1 commit into from
Dec 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ lib
es
coverage
examples/dist
node_modules
node_modules
18 changes: 18 additions & 0 deletions karma.conf.coverage.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
module.exports = function(config) {
require('./karma.conf.js')(config);
config.set({
webpack: {
module: {
rules: config.webpack.module.rules.concat([
{
test: /\.js$/,
exclude: [/node_modules/],
use: {
loader: 'babel-loader',
options: {
plugins: ['istanbul']
}
}
}
])
}
},
reporters: config.reporters.concat(['coverage']),
plugins: config.plugins.concat(['karma-coverage']),
coverageReporter: {
reporters: [
{
Expand Down
23 changes: 1 addition & 22 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
const path = require('path');

// Note: If we switch to ESM version of babelified files, we'll likely need to
// update from the ancient isparta-loader. Likely we'll switch to:
// https://github.com/istanbuljs/babel-plugin-istanbul with a `test` BABEL_ENV
//
// https://github.com/FormidableLabs/radium/issues/969
process.env.BABEL_ENV = 'commonjs';
ryan-roemer marked this conversation as resolved.
Show resolved Hide resolved

module.exports = function(config) {
Expand All @@ -31,19 +26,7 @@ module.exports = function(config) {
{
test: /\.js$/,
enforce: 'pre',
include: path.resolve('src/__tests__/'),
loader: 'babel-loader'
},
{
test: /\.js$/,
include: path.resolve('src/'),
enforce: 'pre',
exclude: /(__tests__|__mocks__)/,
loader: 'isparta-loader?babel-loader'
},
{
test: /\.js$/,
exclude: [/node_modules/],
loader: 'babel-loader'
},
{
Expand Down Expand Up @@ -87,19 +70,15 @@ module.exports = function(config) {
flags: ['--no-sandbox']
}
},
reporters: ['mocha', 'coverage'],
reporters: ['mocha'],
browserNoActivityTimeout: 60000,
plugins: [
'karma-chrome-launcher',
'karma-coverage',
'karma-mocha',
'karma-mocha-reporter',
'karma-sinon-chai',
'karma-webpack'
],
coverageReporter: {
type: 'text'
},
browserConsoleLogOptions: {
level: 'log',
format: '%b %T: %m',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
},
"devDependencies": {
"babel-eslint": "^7.1.1",
"babel-plugin-istanbul": "^5.1.0",
"caniuse-api": "^2.0.0",
"chai": "^3.5.0",
"color": "^1.0.3",
Expand All @@ -89,7 +90,6 @@
"express-http-proxy": "^0.11.0",
"flow-bin": "^0.53.1",
"inject-loader": "^3.0.1",
"isparta-loader": "^2.0.0",
"jsdom": "^12.0.0",
"jsdom-global": "^3.0.2",
"karma": "^3.0.0",
Expand Down
Loading