@@ -8,6 +8,7 @@ import { themeLight } from '../../src/styles/themes/theme.light';
8
8
import { themeDark } from '../../src/styles/themes/theme.dark' ;
9
9
import 'jest-styled-components' ;
10
10
import Toggle from '../../src/components/Toggle' ;
11
+ import { TOGGLE } from '../../src/data/constants' ;
11
12
12
13
const mockClick = jest . fn ( ) ;
13
14
const mockStore = configureMockStore ( ) ;
@@ -90,7 +91,7 @@ describe('<Toggle> actions', () => {
90
91
toggle . find ( 'button' ) . simulate ( 'click' ) ;
91
92
92
93
const actions = store . getActions ( ) ;
93
- expect ( actions ) . toMatchObject ( [ { type : ' TOGGLE' , payload : 'mode' } ] ) ;
94
+ expect ( actions ) . toMatchObject ( [ { type : TOGGLE , payload : 'mode' } ] ) ;
94
95
} ) ;
95
96
96
97
it ( 'toggles MODE to DARK' , ( ) => {
@@ -111,7 +112,7 @@ describe('<Toggle> actions', () => {
111
112
toggle . find ( 'button' ) . simulate ( 'click' ) ;
112
113
113
114
const actions = store . getActions ( ) ;
114
- expect ( actions ) . toMatchObject ( [ { type : ' TOGGLE' , payload : 'mode' } ] ) ;
115
+ expect ( actions ) . toMatchObject ( [ { type : TOGGLE , payload : 'mode' } ] ) ;
115
116
} ) ;
116
117
117
118
it ( 'toggles JS to ES6' , ( ) => {
@@ -132,7 +133,7 @@ describe('<Toggle> actions', () => {
132
133
toggle . find ( 'button' ) . simulate ( 'click' ) ;
133
134
134
135
const actions = store . getActions ( ) ;
135
- expect ( actions ) . toMatchObject ( [ { type : ' TOGGLE' , payload : 'js' } ] ) ;
136
+ expect ( actions ) . toMatchObject ( [ { type : TOGGLE , payload : 'js' } ] ) ;
136
137
} ) ;
137
138
138
139
it ( 'toggles JS to ES5' , ( ) => {
@@ -153,6 +154,6 @@ describe('<Toggle> actions', () => {
153
154
toggle . find ( 'button' ) . simulate ( 'click' ) ;
154
155
155
156
const actions = store . getActions ( ) ;
156
- expect ( actions ) . toMatchObject ( [ { type : ' TOGGLE' , payload : 'js' } ] ) ;
157
+ expect ( actions ) . toMatchObject ( [ { type : TOGGLE , payload : 'js' } ] ) ;
157
158
} ) ;
158
159
} ) ;
0 commit comments