Skip to content

Commit 1b820f7

Browse files
committed
Fix test execution. Fix failing tests.
1 parent aa18eb8 commit 1b820f7

File tree

5 files changed

+29
-4
lines changed

5 files changed

+29
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"scripts": {
1010
"lint": "eslint src test",
11-
"test": "mocha --compilers js:babel-register --reporter spec test/general/*.js test/assertions/*.js test/asserts/**/*.js",
11+
"test": "mocha --compilers js:babel-register --reporter spec --recursive",
1212
"build": "babel src --out-dir lib --copy-files",
1313
"prepublish": "rimraf lib && npm run build"
1414
},

test/asserts/toDispatchActionsWithState.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ describe('toDispatchActionsWithState', () => {
2323
it('should be function', () => { expect(toDispatchActionsWithState).toBeA('function'); });
2424

2525
it('should call performAssertion with assertDispatchedActions as first argument', () => {
26-
toDispatchActionsWithState(actualAction, expectedAction, spyDone, spyFail);
26+
toDispatchActionsWithState(initialState, actualAction, expectedAction, spyDone, spyFail);
2727

2828
expect(performAssertionObj.performAssertion).toHaveBeenCalledWith(
2929
assertDispatchedActionsObj.assertDispatchedActions,

test/asserts/toNotDispatchActions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ describe('toNotDispatchActions', () => {
2525
it('should call toNotDispatchActionsWithState with initialState', () => {
2626
toNotDispatchActions(actualAction, expectedAction, spyDone, spyFail);
2727

28-
expect(assertions.toDispatchActionsWithState)
28+
expect(assertions.toNotDispatchActionsWithState)
2929
.toHaveBeenCalledWith(initialState, actualAction, expectedAction, spyDone, spyFail);
3030
});
3131

test/asserts/toNotDispatchActionsWithState.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ describe('toNotDispatchActionsWithState', () => {
2323
it('should be function', () => { expect(toNotDispatchActionsWithState).toBeA('function'); });
2424

2525
it('should call performAssertion with assertNotDispatchedActions as first argument', () => {
26-
toNotDispatchActionsWithState(actualAction, expectedAction, spyDone, spyFail);
26+
toNotDispatchActionsWithState(initialState, actualAction, expectedAction, spyDone, spyFail);
2727

2828
expect(performAssertionObj.performAssertion).toHaveBeenCalledWith(
2929
assertNotDispatchedActionsObj.assertNotDispatchedActions,

test/index.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import expect from 'expect';
2+
import {
3+
registerMiddlewares,
4+
registerInitialStoreState,
5+
buildInitialStoreState,
6+
assertions
7+
} from '../src';
8+
9+
describe('index', () => {
10+
it('should export registerMiddlewares', () => {
11+
expect(registerMiddlewares).toBeA('function');
12+
});
13+
14+
it('should export registerInitialStoreState', () => {
15+
expect(registerInitialStoreState).toBeA('function');
16+
});
17+
18+
it('should export buildInitialStoreState', () => {
19+
expect(buildInitialStoreState).toBeA('function');
20+
});
21+
22+
it('should export assertions', () => {
23+
expect(assertions).toBeA('object');
24+
});
25+
});

0 commit comments

Comments
 (0)