@@ -20,7 +20,8 @@ describe('Live preview tests', () => {
20
20
environment : 'environment' ,
21
21
live_preview : {
22
22
enable : true ,
23
- management_token : 'management_token'
23
+ management_token : 'management_token' ,
24
+ host : 'api.contentstack.io'
24
25
}
25
26
} )
26
27
const livePreviewObject = stack . config . live_preview
@@ -38,13 +39,14 @@ describe('Live preview tests', () => {
38
39
environment : 'environment' ,
39
40
live_preview : {
40
41
enable : false ,
41
- management_token : 'management_token'
42
+ management_token : 'management_token' ,
43
+ host : 'api.contentstack.io'
42
44
}
43
45
} )
44
46
const livePreviewObject = stack . config . live_preview
45
47
expect ( livePreviewObject ) . not . toBeUndefined ( ) ;
46
48
expect ( livePreviewObject ) . toHaveProperty ( 'enable' ) ;
47
- expect ( livePreviewObject ) . not . toHaveProperty ( 'host' ) ;
49
+ expect ( livePreviewObject ) . toHaveProperty ( 'host' ) ;
48
50
expect ( livePreviewObject ) . not . toHaveProperty ( 'preview' ) ;
49
51
expect ( stack . config . host ) . toBe ( 'cdn.contentstack.io' ) ;
50
52
} ) ;
@@ -56,14 +58,16 @@ describe('Live preview tests', () => {
56
58
environment : 'environment' ,
57
59
live_preview : {
58
60
enable : true ,
59
- preview_token : 'preview_token'
61
+ preview_token : 'preview_token' ,
62
+ host : 'rest-preview.contentstack.com'
60
63
}
61
64
} )
62
65
const livePreviewObject = stack . config . live_preview
63
66
expect ( livePreviewObject ) . not . toBeUndefined ( ) ;
64
67
expect ( livePreviewObject ) . toHaveProperty ( 'enable' ) ;
65
68
expect ( livePreviewObject ) . toHaveProperty ( 'host' ) ;
66
- expect ( livePreviewObject ) . not . toHaveProperty ( 'preview' ) ;
69
+ expect ( livePreviewObject ) . toHaveProperty ( 'preview_token' ) ;
70
+ expect ( livePreviewObject ) . not . toHaveProperty ( 'management_token' ) ;
67
71
expect ( stack . config . host ) . toBe ( 'rest-preview.contentstack.com' ) ;
68
72
} ) ;
69
73
0 commit comments