Skip to content

Commit

Permalink
use babel-register in karma.conf.js
Browse files Browse the repository at this point in the history
  • Loading branch information
nfcampos authored and Nuno Campos committed Sep 13, 2016
1 parent 5e18477 commit d5f6048
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
5 changes: 3 additions & 2 deletions karma.conf.js
@@ -1,9 +1,10 @@
/* eslint-disable no-var,prefer-arrow-callback */
/* eslint-disable no-var,prefer-arrow-callback,vars-on-top */

require('babel-register');

var IgnorePlugin = require('webpack').IgnorePlugin;
var REACT013 = require('./src/version').REACT013;


module.exports = function karma(config) {
config.set({
basePath: '.',
Expand Down
16 changes: 5 additions & 11 deletions src/version.js
@@ -1,12 +1,6 @@
/* eslint-disable no-var,object-shorthand */
import React from 'react';

var React = require('react');

var VERSION = React.version;

module.exports = {
VERSION: VERSION,
REACT013: VERSION.slice(0, 4) === '0.13',
REACT014: VERSION.slice(0, 4) === '0.14',
REACT15: VERSION.slice(0, 3) === '15.',
};
export const VERSION = React.version;
export const REACT013 = VERSION.slice(0, 4) === '0.13';
export const REACT014 = VERSION.slice(0, 4) === '0.14';
export const REACT15 = VERSION.slice(0, 3) === '15.';

0 comments on commit d5f6048

Please sign in to comment.