11'use strict' ;
2- var server = require ( 'karma' ) . server
2+ var Server = require ( 'karma' ) . Server
33 , webpack = require ( 'webpack' )
4- , webpackConfig = require ( './webpack.configs' ) . test ;
4+ , webpackConfig = require ( '../build/test.config' ) ;
55
66var plugins = webpackConfig . plugins || [ ] ;
77
88webpackConfig . externals = {
9- 'react' : 'window.React' ,
10- 'react/addons' : 'window.React'
9+ 'react' : 'window.React' ,
10+ 'react-dom' : 'window.React' ,
11+ 'react/addons' : 'window.React' ,
12+ 'react-dom/server' : 'window.React'
1113}
1214
1315
14- var SUPPORTED_VERSIONS = [ "0.12.2" , "0.13.0" ] ;
16+ var SUPPORTED_VERSIONS = [ '0.14.0-rc' ] ;
1517
1618
1719series ( SUPPORTED_VERSIONS , function ( version , idx , next ) {
1820 console . log ( '-------------------------------------------' ) ;
1921 console . log ( '------- Testing React version: ' + version ) ;
2022 console . log ( '-------------------------------------------' ) ;
2123
22- server . start (
23- config ( version )
24- , function ( exitCode ) {
25- if ( exitCode )
26- process . exit ( exitCode )
24+ var server = new Server ( config ( version ) , function ( exitCode ) {
25+ if ( exitCode )
26+ process . exit ( exitCode )
2727
28- next ( ) ;
29- } ) ;
30- } , function ( ) {
31- process . exit ( 0 )
28+ next ( ) ;
29+ } ) ;
30+
31+
32+ server . start ( ) ;
3233} )
3334
3435function config ( version ) {
3536
3637 webpackConfig . plugins = plugins . concat (
3738 new webpack . DefinePlugin ( {
38- '__REACT_VERSION__' : JSON . stringify ( version ) ,
39+ '__REACT_VERSION__' : JSON . stringify ( version )
3940 } )
4041 )
4142
@@ -50,7 +51,7 @@ function config(version){
5051 'https://cdnjs.cloudflare.com/ajax/libs/react/' + version + '/react-with-addons.js' ,
5152 './vendor/sinon-1.10.3.js' ,
5253 './vendor/jquery-1.11.2.min.js' ,
53- '_test-bootstrap .js'
54+ './test/index .js'
5455 ] ,
5556
5657 reporters : [ 'mocha' ] ,
@@ -65,7 +66,7 @@ function config(version){
6566 browsers : [ 'PhantomJS' ] ,
6667
6768 preprocessors : {
68- '_test-bootstrap .js' : [ 'webpack' ]
69+ 'test/index .js' : [ 'webpack' ]
6970 } ,
7071
7172 webpack : webpackConfig ,
0 commit comments