Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6214

TypeError: seamless immutable _1.default is not a function - React native jest unit testing (Typescript)

$
0
0

I am trying jest unit testing for typescript based react native project.Now I am stuck on one issue when do npm test. Error mentioned below

● Test suite failed to run

TypeError: seamless_immutable_1.default is not a function  34 |   35 | > 36 | export const INITIAL_STATE: ImmutableAppReducerState = Immutable({     |                                                                 ^  37 |   activeTab: 0,  38 |   showTab: false,  39 |   tabName: "",

My actual code was follows

import Immutable from "seamless-immutable";

export interface AppReducerState {  activeTab?: number | undefined;  showTab?: boolean | undefined;  tabName?: string | undefined;  isDrawerOpen: boolean;  retryAction: AnyAction[];}/* ------------- Initial State ------------- */type ImmutableAppReducerState = Immutable.Immutable<AppReducerState>export const INITIAL_STATE: ImmutableAppReducerState = Immutable({  activeTab: 0,  showTab: false,  tabName: "",  isDrawerOpen: false,  retryAction: [],});

Viewing all articles
Browse latest Browse all 6214

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>