@@ -8,6 +8,7 @@ import { themeLight } from '../../src/styles/themes/theme.light';
88import { themeDark } from '../../src/styles/themes/theme.dark' ;
99import 'jest-styled-components' ;
1010import Toggle from '../../src/components/Toggle' ;
11+ import { TOGGLE } from '../../src/static/constants/actions' ;
1112
1213const mockClick = jest . fn ( ) ;
1314const mockStore = configureMockStore ( ) ;
@@ -90,7 +91,7 @@ describe('<Toggle> actions', () => {
9091 toggle . find ( 'button' ) . simulate ( 'click' ) ;
9192
9293 const actions = store . getActions ( ) ;
93- expect ( actions ) . toMatchObject ( [ { type : ' TOGGLE' , payload : 'mode' } ] ) ;
94+ expect ( actions ) . toMatchObject ( [ { type : TOGGLE , payload : 'mode' } ] ) ;
9495 } ) ;
9596
9697 it ( 'toggles MODE to DARK' , ( ) => {
@@ -111,7 +112,7 @@ describe('<Toggle> actions', () => {
111112 toggle . find ( 'button' ) . simulate ( 'click' ) ;
112113
113114 const actions = store . getActions ( ) ;
114- expect ( actions ) . toMatchObject ( [ { type : ' TOGGLE' , payload : 'mode' } ] ) ;
115+ expect ( actions ) . toMatchObject ( [ { type : TOGGLE , payload : 'mode' } ] ) ;
115116 } ) ;
116117
117118 it ( 'toggles JS to ES6' , ( ) => {
@@ -132,7 +133,7 @@ describe('<Toggle> actions', () => {
132133 toggle . find ( 'button' ) . simulate ( 'click' ) ;
133134
134135 const actions = store . getActions ( ) ;
135- expect ( actions ) . toMatchObject ( [ { type : ' TOGGLE' , payload : 'js' } ] ) ;
136+ expect ( actions ) . toMatchObject ( [ { type : TOGGLE , payload : 'js' } ] ) ;
136137 } ) ;
137138
138139 it ( 'toggles JS to ES5' , ( ) => {
@@ -153,6 +154,6 @@ describe('<Toggle> actions', () => {
153154 toggle . find ( 'button' ) . simulate ( 'click' ) ;
154155
155156 const actions = store . getActions ( ) ;
156- expect ( actions ) . toMatchObject ( [ { type : ' TOGGLE' , payload : 'js' } ] ) ;
157+ expect ( actions ) . toMatchObject ( [ { type : TOGGLE , payload : 'js' } ] ) ;
157158 } ) ;
158159} ) ;
0 commit comments