@@ -95,4 +95,116 @@ describe('public SDK surface', () => {
9595 expect ( useAppStateListener ) . toBeDefined ( ) ;
9696 expect ( useDeviceOrientation ) . toBeDefined ( ) ;
9797 } ) ;
98+
99+ describe ( 'exported enum values' , ( ) => {
100+ it ( 'IterableActionSource contains expected members' , ( ) => {
101+ expect ( IterableActionSource . push ) . toBe ( 0 ) ;
102+ expect ( IterableActionSource . appLink ) . toBe ( 1 ) ;
103+ expect ( IterableActionSource . inApp ) . toBe ( 2 ) ;
104+ expect ( IterableActionSource . embedded ) . toBe ( 3 ) ;
105+ } ) ;
106+
107+ it ( 'IterableInAppCloseSource contains expected members' , ( ) => {
108+ expect ( IterableInAppCloseSource . back ) . toBe ( 0 ) ;
109+ expect ( IterableInAppCloseSource . link ) . toBe ( 1 ) ;
110+ expect ( IterableInAppCloseSource . unknown ) . toBe ( 100 ) ;
111+ } ) ;
112+
113+ it ( 'IterableInAppLocation contains expected members' , ( ) => {
114+ expect ( IterableInAppLocation . inApp ) . toBe ( 0 ) ;
115+ expect ( IterableInAppLocation . inbox ) . toBe ( 1 ) ;
116+ } ) ;
117+
118+ it ( 'IterableInAppShowResponse contains expected members' , ( ) => {
119+ expect ( IterableInAppShowResponse . show ) . toBe ( 0 ) ;
120+ expect ( IterableInAppShowResponse . skip ) . toBe ( 1 ) ;
121+ } ) ;
122+
123+ it ( 'IterableInAppTriggerType contains expected members' , ( ) => {
124+ expect ( IterableInAppTriggerType . immediate ) . toBe ( 0 ) ;
125+ expect ( IterableInAppTriggerType . event ) . toBe ( 1 ) ;
126+ expect ( IterableInAppTriggerType . never ) . toBe ( 2 ) ;
127+ } ) ;
128+
129+ it ( 'IterableDataRegion contains expected members' , ( ) => {
130+ expect ( IterableDataRegion . US ) . toBe ( 0 ) ;
131+ expect ( IterableDataRegion . EU ) . toBe ( 1 ) ;
132+ } ) ;
133+
134+ it ( 'IterableLogLevel contains expected members' , ( ) => {
135+ expect ( IterableLogLevel . error ) . toBe ( 3 ) ;
136+ expect ( IterableLogLevel . debug ) . toBe ( 1 ) ;
137+ expect ( IterableLogLevel . info ) . toBe ( 2 ) ;
138+ } ) ;
139+
140+ it ( 'IterablePushPlatform contains expected members' , ( ) => {
141+ expect ( IterablePushPlatform . sandbox ) . toBe ( 0 ) ;
142+ expect ( IterablePushPlatform . production ) . toBe ( 1 ) ;
143+ expect ( IterablePushPlatform . auto ) . toBe ( 2 ) ;
144+ } ) ;
145+
146+ it ( 'IterableRetryBackoff contains expected members' , ( ) => {
147+ expect ( IterableRetryBackoff . linear ) . toBe ( 'LINEAR' ) ;
148+ expect ( IterableRetryBackoff . exponential ) . toBe ( 'EXPONENTIAL' ) ;
149+ } ) ;
150+
151+ it ( 'IterableEmbeddedViewType contains expected members' , ( ) => {
152+ expect ( IterableEmbeddedViewType . Banner ) . toBe ( 0 ) ;
153+ expect ( IterableEmbeddedViewType . Card ) . toBe ( 1 ) ;
154+ expect ( IterableEmbeddedViewType . Notification ) . toBe ( 2 ) ;
155+ } ) ;
156+ } ) ;
157+
158+ describe ( 'exported hooks are functions' , ( ) => {
159+ it ( 'useAppStateListener is a function' , ( ) => {
160+ expect ( typeof useAppStateListener ) . toBe ( 'function' ) ;
161+ } ) ;
162+
163+ it ( 'useDeviceOrientation is a function' , ( ) => {
164+ expect ( typeof useDeviceOrientation ) . toBe ( 'function' ) ;
165+ } ) ;
166+ } ) ;
167+
168+ describe ( 'exported components are valid React components' , ( ) => {
169+ it ( 'IterableInbox is a valid React component' , ( ) => {
170+ expect ( IterableInbox ) . toBeDefined ( ) ;
171+ // React components are functions or classes (forwardRef objects expose a render fn)
172+ const type = typeof IterableInbox ;
173+ expect (
174+ type === 'function' ||
175+ type === 'object' ||
176+ type === 'symbol'
177+ ) . toBe ( true ) ;
178+ } ) ;
179+
180+ it ( 'IterableInboxEmptyState is a valid React component' , ( ) => {
181+ expect ( IterableInboxEmptyState ) . toBeDefined ( ) ;
182+ const type = typeof IterableInboxEmptyState ;
183+ expect (
184+ type === 'function' ||
185+ type === 'object' ||
186+ type === 'symbol'
187+ ) . toBe ( true ) ;
188+ } ) ;
189+
190+ it ( 'IterableInboxMessageCell is a valid React component' , ( ) => {
191+ expect ( IterableInboxMessageCell ) . toBeDefined ( ) ;
192+ const type = typeof IterableInboxMessageCell ;
193+ expect (
194+ type === 'function' ||
195+ type === 'object' ||
196+ type === 'symbol'
197+ ) . toBe ( true ) ;
198+ } ) ;
199+
200+ it ( 'IterableEmbeddedView is a valid React component' , ( ) => {
201+ expect ( IterableEmbeddedView ) . toBeDefined ( ) ;
202+ const type = typeof IterableEmbeddedView ;
203+ expect (
204+ type === 'function' ||
205+ type === 'object' ||
206+ type === 'symbol'
207+ ) . toBe ( true ) ;
208+ } ) ;
209+ } ) ;
98210} ) ;
0 commit comments