Skip to content

Commit dd32c34

Browse files
Move the test into the proper file
1 parent b215956 commit dd32c34

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

test/index.spec.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,4 @@ describe('immutableStateInvariantMiddleware', () => {
8484
dispatch({type: 'SOME_ACTION', x});
8585
}).toNotThrow();
8686
});
87-
88-
it('works correctly with NaN', () => {
89-
const next = action => action;
90-
91-
const dispatch = middleware(next);
92-
93-
state = {foo: NaN};
94-
expect(() => {
95-
dispatch({type: 'SOME_ACTION'});
96-
}).toNotThrow();
97-
})
9887
});

test/trackForMutations.spec.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,10 @@ describe('trackForMutations', () => {
226226
fn: (s) => {
227227
return {...s, foo: {}};
228228
}
229+
},
230+
'having a NaN in the state': {
231+
getState: () => ({ a:NaN, b: Number.NaN }),
232+
fn: (s) => s
229233
}
230234
};
231235

0 commit comments

Comments
 (0)