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 88 "test:expect" : " mocha --compilers js:babel-register --reporter spec test/expect/*.js" ,
99 "test:expectjs" : " mocha --compilers js:babel-register --reporter spec test/expectjs/*.js" ,
1010 "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" ,
1213 "prepublish" : " rimraf build && babel src --out-dir build --copy-files"
1314 },
1415 "repository" : {
Original file line number Diff line number Diff line change 1- import tape from 'tape'
1+ import test from 'tape' ;
22import thunk from 'redux-thunk' ;
33
4- import { registerMiddlewares } from '../../src' ;
5- import { registerAssertions } from '../../src/should' ;
4+ import { assertions , registerMiddlewares } from '../../src' ;
65import actions from '../testingData/actions' ;
76
87registerMiddlewares ( [ thunk ] ) ;
9- registerAssertions ( ) ;
108
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 ) ;
1732} ) ;
You can’t perform that action at this time.
0 commit comments