Skip to content

Commit 87a905e

Browse files
committed
Remove some test warnings
1 parent 38ffde4 commit 87a905e

File tree

5 files changed

+9
-2
lines changed

5 files changed

+9
-2
lines changed

karma.conf.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ module.exports = function(config) {
1616
},
1717

1818
browserify: {
19+
transform: ['envify'],
1920
watch: true,
2021
debug: true
2122
},

modules/components/Routes.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ var Route = require('../components/Route');
77
var Path = require('../utils/Path');
88
var Redirect = require('../utils/Redirect');
99
var Transition = require('../utils/Transition');
10+
var DefaultLocation = require('../locations/DefaultLocation');
1011
var HashLocation = require('../locations/HashLocation');
1112
var HistoryLocation = require('../locations/HistoryLocation');
1213
var RefreshLocation = require('../locations/RefreshLocation');
@@ -92,7 +93,7 @@ var Routes = React.createClass({
9293
onActiveStateChange: defaultActiveStateChangeHandler,
9394
onTransitionError: defaultTransitionErrorHandler,
9495
preserveScrollPosition: false,
95-
location: HashLocation
96+
location: DefaultLocation
9697
};
9798
},
9899

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = process.env.NODE_ENV === 'test'
2+
? require('./MemoryLocation')
3+
: require('./HashLocation');

modules/stores/PathStore.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ var PathStore = {
6868
},
6969

7070
teardown: function () {
71+
_events.removeAllListeners(CHANGE_EVENT);
72+
7173
if (_location && typeof _location.teardown === 'function')
7274
_location.teardown();
7375

scripts/test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/bin/sh
2-
node_modules/.bin/karma start "$@"
2+
NODE_ENV=test node_modules/.bin/karma start "$@"

0 commit comments

Comments
 (0)