File tree Expand file tree Collapse file tree 5 files changed +9
-2
lines changed Expand file tree Collapse file tree 5 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ module.exports = function(config) {
16
16
} ,
17
17
18
18
browserify : {
19
+ transform : [ 'envify' ] ,
19
20
watch : true ,
20
21
debug : true
21
22
} ,
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ var Route = require('../components/Route');
7
7
var Path = require ( '../utils/Path' ) ;
8
8
var Redirect = require ( '../utils/Redirect' ) ;
9
9
var Transition = require ( '../utils/Transition' ) ;
10
+ var DefaultLocation = require ( '../locations/DefaultLocation' ) ;
10
11
var HashLocation = require ( '../locations/HashLocation' ) ;
11
12
var HistoryLocation = require ( '../locations/HistoryLocation' ) ;
12
13
var RefreshLocation = require ( '../locations/RefreshLocation' ) ;
@@ -92,7 +93,7 @@ var Routes = React.createClass({
92
93
onActiveStateChange : defaultActiveStateChangeHandler ,
93
94
onTransitionError : defaultTransitionErrorHandler ,
94
95
preserveScrollPosition : false ,
95
- location : HashLocation
96
+ location : DefaultLocation
96
97
} ;
97
98
} ,
98
99
Original file line number Diff line number Diff line change
1
+ module . exports = process . env . NODE_ENV === 'test'
2
+ ? require ( './MemoryLocation' )
3
+ : require ( './HashLocation' ) ;
Original file line number Diff line number Diff line change @@ -68,6 +68,8 @@ var PathStore = {
68
68
} ,
69
69
70
70
teardown : function ( ) {
71
+ _events . removeAllListeners ( CHANGE_EVENT ) ;
72
+
71
73
if ( _location && typeof _location . teardown === 'function' )
72
74
_location . teardown ( ) ;
73
75
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
- node_modules/.bin/karma start " $@ "
2
+ NODE_ENV=test node_modules/.bin/karma start " $@ "
You can’t perform that action at this time.
0 commit comments