-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
karma tests on all versions of react
- rewrote src/version.js in ES5 to be able to use it in karma.conf.js - conditionally add webpack.IgnorePlugin based on React version installed, mirrorring react-compat.js
- Loading branch information
Nuno Campos
committed
Jun 10, 2016
1 parent
de2ee64
commit 69532d0
Showing
3 changed files
with
33 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
import React from 'react'; | ||
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.'; | ||
/* eslint-disable no-var,object-shorthand */ | ||
|
||
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.', | ||
}; |