11/* eslint-env jasmine */
22import { assertions } from 'redux-actions-assertions-js' ;
33
4- const toDispatchActions = ( ) => {
4+ function toDispatchActions ( ) {
55 return {
66 compare ( action , expectedActions , done ) {
77 assertions . toDispatchActions ( action , expectedActions , done , done . fail ) ;
88 return { pass : true } ;
9+ } ,
10+ negativeCompare ( action , expectedActions , done ) {
11+ assertions . toNotDispatchActions ( action , expectedActions , done , done . fail ) ;
12+ return { pass : true } ;
913 }
1014 } ;
11- } ;
15+ }
1216
13- const toNotDispatchActions = ( ) => {
17+ function toNotDispatchActions ( ) {
1418 return {
1519 compare ( action , expectedActions , done ) {
1620 assertions . toNotDispatchActions ( action , expectedActions , done , done . fail ) ;
1721 return { pass : true } ;
1822 }
1923 } ;
20- } ;
24+ }
2125
22- const toDispatchActionsWithState = ( ) => {
26+ function toDispatchActionsWithState ( ) {
2327 return {
2428 compare ( action , state , expectedActions , done ) {
2529 assertions . toDispatchActionsWithState ( state , action , expectedActions , done , done . fail ) ;
2630 return { pass : true } ;
31+ } ,
32+ negativeCompare ( action , state , expectedActions , done ) {
33+ assertions . toNotDispatchActionsWithState ( state , action , expectedActions , done , done . fail ) ;
34+ return { pass : true } ;
2735 }
2836 } ;
29- } ;
37+ }
3038
31- const toNotDispatchActionsWithState = ( ) => {
39+ function toNotDispatchActionsWithState ( ) {
3240 return {
3341 compare ( action , state , expectedActions , done ) {
3442 assertions . toNotDispatchActionsWithState ( state , action , expectedActions , done , done . fail ) ;
3543 return { pass : true } ;
3644 }
3745 } ;
38- } ;
46+ }
3947
4048const matchers = {
4149 toDispatchActions,
@@ -44,9 +52,9 @@ const matchers = {
4452 toNotDispatchActionsWithState
4553} ;
4654
47- const registerAssertions = ( ) => {
55+ function registerAssertions ( ) {
4856 jasmine . addMatchers ( matchers ) ;
49- } ;
57+ }
5058
5159export {
5260 registerAssertions ,
0 commit comments