Skip to content

Commit bd23312

Browse files
committed
Fix failing tests
1 parent 6b9982c commit bd23312

File tree

2 files changed

+31
-7
lines changed

2 files changed

+31
-7
lines changed

Diff for: modules/components/__tests__/Link-test.js

+10-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ describe('A Link', function () {
2424
)
2525
);
2626

27-
component.dispatch('/mjackson/home', done);
27+
component.dispatch('/mjackson/home', function (error, abortReason, nextState) {
28+
expect(error).toBe(null);
29+
expect(abortReason).toBe(null);
30+
component.setState(nextState, done);
31+
});
2832
});
2933

3034
afterEach(function () {
@@ -52,7 +56,11 @@ describe('A Link', function () {
5256
)
5357
);
5458

55-
component.dispatch('/', done);
59+
component.dispatch('/', function (error, abortReason, nextState) {
60+
expect(error).toBe(null);
61+
expect(abortReason).toBe(null);
62+
component.setState(nextState, done);
63+
});
5664
});
5765

5866
afterEach(function () {

Diff for: modules/mixins/__tests__/Navigation-test.js

+21-5
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,16 @@ describe('Navigation', function () {
2222
var component;
2323
beforeEach(function (done) {
2424
component = ReactTestUtils.renderIntoDocument(
25-
Routes({ location: 'none' },
25+
Routes({ location: 'none', onChange: done },
2626
Route({ name: 'home', path: '/:username/home', handler: NavigationHandler })
2727
)
2828
);
2929

30-
component.dispatch('/anybody/home', done);
30+
component.dispatch('/anybody/home', function (error, abortReason, nextState) {
31+
expect(error).toBe(null);
32+
expect(abortReason).toBe(null);
33+
component.setState(nextState, done);
34+
});
3135
});
3236

3337
afterEach(function () {
@@ -50,7 +54,11 @@ describe('Navigation', function () {
5054
)
5155
);
5256

53-
component.dispatch('/home', done);
57+
component.dispatch('/home', function (error, abortReason, nextState) {
58+
expect(error).toBe(null);
59+
expect(abortReason).toBe(null);
60+
component.setState(nextState, done);
61+
});
5462
});
5563

5664
afterEach(function () {
@@ -78,7 +86,11 @@ describe('Navigation', function () {
7886
)
7987
);
8088

81-
component.dispatch('/home', done);
89+
component.dispatch('/home', function (error, abortReason, nextState) {
90+
expect(error).toBe(null);
91+
expect(abortReason).toBe(null);
92+
component.setState(nextState, done);
93+
});
8294
});
8395

8496
afterEach(function () {
@@ -101,7 +113,11 @@ describe('Navigation', function () {
101113
)
102114
);
103115

104-
component.dispatch('/home', done);
116+
component.dispatch('/home', function (error, abortReason, nextState) {
117+
expect(error).toBe(null);
118+
expect(abortReason).toBe(null);
119+
component.setState(nextState, done);
120+
});
105121
});
106122

107123
afterEach(function () {

0 commit comments

Comments
 (0)