custom-immutable-matchers icon indicating copy to clipboard operation
custom-immutable-matchers copied to clipboard

ReferenceError: Immutable is not defined

Open moezbenrebah opened this issue 1 year ago • 0 comments

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

moezbenrebah avatar Mar 10 '23 08:03 moezbenrebah