File tree Expand file tree Collapse file tree 2 files changed +27
-11
lines changed Expand file tree Collapse file tree 2 files changed +27
-11
lines changed Original file line number Diff line number Diff line change 8
8
"test:expect" : " mocha --compilers js:babel-register --reporter spec test/expect/*.js" ,
9
9
"test:expectjs" : " mocha --compilers js:babel-register --reporter spec test/expectjs/*.js" ,
10
10
"test:should" : " mocha --compilers js:babel-register --reporter spec test/should/*.js" ,
11
- "test" : " npm run test:index && npm run test:chai && npm run test:expect && npm run test:expectjs && npm run test:should" ,
11
+ "test:tape" : " tape --require babel-register test/tape/*.js" ,
12
+ "test" : " npm run test:index && npm run test:chai && npm run test:expect && npm run test:expectjs && npm run test:should && npm run test:tape" ,
12
13
"prepublish" : " rimraf build && babel src --out-dir build --copy-files"
13
14
},
14
15
"repository" : {
Original file line number Diff line number Diff line change 1
- import tape from 'tape'
1
+ import test from 'tape' ;
2
2
import thunk from 'redux-thunk' ;
3
3
4
- import { registerMiddlewares } from '../../src' ;
5
- import { registerAssertions } from '../../src/should' ;
4
+ import { assertions , registerMiddlewares } from '../../src' ;
6
5
import actions from '../testingData/actions' ;
7
6
8
7
registerMiddlewares ( [ thunk ] ) ;
9
- registerAssertions ( ) ;
10
8
11
- describe ( 'tape' , ( ) => {
12
- describe ( '' , ( ) => {
13
- it ( '' , ( done ) => {
14
- done ( )
15
- } )
16
- } ) ;
9
+ test ( 'tape' , t => {
10
+ t . plan ( 1 ) ;
11
+ const msg = 'should pass with t.plan' ;
12
+
13
+ assertions . toDispatchActionsWithState (
14
+ { property : 'value' } ,
15
+ actions . actionCreatorWithGetState ( ) ,
16
+ actions . actionWithGetState ( { property : 'value' } ) ,
17
+ t . pass . bind ( this , msg ) ,
18
+ t . fail . bind ( this , msg )
19
+ ) ;
20
+ } ) ;
21
+
22
+ test ( 'tape' , t => {
23
+ const msg = 'should pass with t.end' ;
24
+
25
+ assertions . toDispatchActionsWithState (
26
+ { property : 'value' } ,
27
+ actions . actionCreatorWithGetState ( ) ,
28
+ actions . actionWithGetState ( { property : 'value' } ) ,
29
+ t . pass . bind ( this , msg ) ,
30
+ t . fail . bind ( this , msg )
31
+ ) . then ( t . end ) ;
17
32
} ) ;
You can’t perform that action at this time.
0 commit comments