@@ -110,12 +110,12 @@ describe('serializableStateInvariantMiddleware', () => {
110
110
store . dispatch ( dispatchedAction )
111
111
112
112
expect ( getLog ( ) . log ) . toMatchInlineSnapshot ( `
113
- "A non-serializable value was detected in an action, in the path: \`payload\`. Value: Symbol(SOME_CONSTANT)
113
+ "A non-serializable value was detected in an action, in the path: \`payload\`. Value: Symbol(SOME_CONSTANT)
114
114
Take a look at the logic that dispatched this action: Object {
115
115
"payload": Symbol(SOME_CONSTANT),
116
116
"type": "an-action",
117
- }
118
- (See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)
117
+ }
118
+ (See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)
119
119
(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)"
120
120
` )
121
121
} )
@@ -154,7 +154,7 @@ describe('serializableStateInvariantMiddleware', () => {
154
154
store . dispatch ( { type : ACTION_TYPE } )
155
155
156
156
expect ( getLog ( ) . log ) . toMatchInlineSnapshot ( `
157
- "A non-serializable value was detected in the state, in the path: \`testSlice.a\`. Value: Map {}
157
+ "A non-serializable value was detected in the state, in the path: \`testSlice.a\`. Value: Map {}
158
158
Take a look at the reducer(s) handling this action type: TEST_ACTION.
159
159
(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)"
160
160
` )
@@ -215,7 +215,7 @@ describe('serializableStateInvariantMiddleware', () => {
215
215
216
216
// since default options are used, the `entries` function in `serializableObject` will cause the error
217
217
expect ( getLog ( ) . log ) . toMatchInlineSnapshot ( `
218
- "A non-serializable value was detected in the state, in the path: \`testSlice.a.entries\`. Value: [Function entries]
218
+ "A non-serializable value was detected in the state, in the path: \`testSlice.a.entries\`. Value: [Function entries]
219
219
Take a look at the reducer(s) handling this action type: TEST_ACTION.
220
220
(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)"
221
221
` )
@@ -262,7 +262,7 @@ describe('serializableStateInvariantMiddleware', () => {
262
262
263
263
// error reported is from a nested class instance, rather than the `entries` function `serializableObject`
264
264
expect ( getLog ( ) . log ) . toMatchInlineSnapshot ( `
265
- "A non-serializable value was detected in the state, in the path: \`testSlice.a.third.bad-map-instance\`. Value: Map {}
265
+ "A non-serializable value was detected in the state, in the path: \`testSlice.a.third.bad-map-instance\`. Value: Map {}
266
266
Take a look at the reducer(s) handling this action type: TEST_ACTION.
267
267
(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)"
268
268
` )
@@ -367,14 +367,14 @@ describe('serializableStateInvariantMiddleware', () => {
367
367
} ) . dispatch ( { type : 'test' , meta : { arg : nonSerializableValue } } )
368
368
369
369
expect ( getLog ( ) . log ) . toMatchInlineSnapshot ( `
370
- "A non-serializable value was detected in an action, in the path: \`meta.arg\`. Value: Map {}
370
+ "A non-serializable value was detected in an action, in the path: \`meta.arg\`. Value: Map {}
371
371
Take a look at the logic that dispatched this action: Object {
372
372
"meta": Object {
373
373
"arg": Map {},
374
374
},
375
375
"type": "test",
376
- }
377
- (See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)
376
+ }
377
+ (See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)
378
378
(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)"
379
379
` )
380
380
} )
@@ -499,7 +499,7 @@ describe('serializableStateInvariantMiddleware', () => {
499
499
500
500
// testSlice.b.d was not covered in ignoredPaths, so will still log the error
501
501
expect ( getLog ( ) . log ) . toMatchInlineSnapshot ( `
502
- "A non-serializable value was detected in the state, in the path: \`testSlice.b.d\`. Value: Map {}
502
+ "A non-serializable value was detected in the state, in the path: \`testSlice.b.d\`. Value: Map {}
503
503
Take a look at the reducer(s) handling this action type: TEST_ACTION.
504
504
(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)"
505
505
` )
@@ -587,7 +587,9 @@ describe('serializableStateInvariantMiddleware', () => {
587
587
it ( 'Should not print a warning if "reducer" takes too long' , ( ) => {
588
588
const reducer : Reducer = ( state = 42 , action ) => {
589
589
const started = Date . now ( )
590
- while ( Date . now ( ) - started < 8 ) { }
590
+ while ( Date . now ( ) - started < 8 ) {
591
+ /* empty */
592
+ }
591
593
return state
592
594
}
593
595
0 commit comments