custom-immutable-matchers
custom-immutable-matchers copied to clipboard
ReferenceError: Immutable is not defined
I got Reference Error: Immutable is not defined when I tried to test if a redux state is an immutable object: my jest code: import * as matchers from 'jest-immutable-matchers'; const { uiReducer, initialState } = require('./uiReducers'); const { DISPLAY_NOTIFICATION_DRAWER } = require('./uiActionTypes');
describe('My suite', function () { beforeEach(function () { expect.extend(matchers); });
it('passes if the object is immutable', () => { const immutState = Immutable.Map(initialState) expect(immutState).toBeImmutableMap(); }); });
How to solve this error please