File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 9
9
],
10
10
"scripts" : {
11
11
"build" : " babel src --out-dir lib" ,
12
- "prepublish" : " rimraf lib && npm run build" ,
13
- "test" : " mocha --compilers js:babel-core/register --reporter spec test/*.js"
12
+ "prepublish" : " npm run test && rimraf lib && npm run build" ,
13
+ "test" : " mocha --compilers js:babel-core/register --reporter spec test/*.js" ,
14
+ "posttest" : " npm run lint" ,
15
+ "lint" : " eslint src test"
14
16
},
15
17
"repository" : {
16
18
"type" : " git" ,
37
39
"chai" : " ^3.2.0" ,
38
40
"eslint" : " ^1.10.2" ,
39
41
"eslint-config-airbnb" : " 1.0.2" ,
42
+ "eslint-plugin-react" : " ^4.1.0" ,
40
43
"mocha" : " ^2.2.5" ,
41
44
"rimraf" : " ^2.4.3"
42
45
}
Original file line number Diff line number Diff line change @@ -5,4 +5,4 @@ function thunkMiddleware({ dispatch, getState }) {
5
5
next ( action ) ;
6
6
}
7
7
8
- module . exports = thunkMiddleware
8
+ module . exports = thunkMiddleware ;
Original file line number Diff line number Diff line change @@ -45,15 +45,15 @@ describe('thunk middleware', () => {
45
45
const expected = 'redux' ;
46
46
const actionHandler = nextHandler ( ( ) => expected ) ;
47
47
48
- let outcome = actionHandler ( ) ;
48
+ const outcome = actionHandler ( ) ;
49
49
chai . assert . strictEqual ( outcome , expected ) ;
50
50
} ) ;
51
51
52
52
it ( 'must return value as expected if a function' , ( ) => {
53
53
const expected = 'rocks' ;
54
54
const actionHandler = nextHandler ( ) ;
55
55
56
- let outcome = actionHandler ( ( ) => expected ) ;
56
+ const outcome = actionHandler ( ( ) => expected ) ;
57
57
chai . assert . strictEqual ( outcome , expected ) ;
58
58
} ) ;
59
59
@@ -71,7 +71,7 @@ describe('thunk middleware', () => {
71
71
it ( 'must throw if argument is non-object' , done => {
72
72
try {
73
73
thunkMiddleware ( ) ;
74
- } catch ( err ) {
74
+ } catch ( err ) {
75
75
done ( ) ;
76
76
}
77
77
} ) ;
You can’t perform that action at this time.
0 commit comments