diff --git a/test/unit/live-preview.spec.ts b/test/unit/live-preview.spec.ts index 72025f5..392ea10 100644 --- a/test/unit/live-preview.spec.ts +++ b/test/unit/live-preview.spec.ts @@ -20,7 +20,8 @@ describe('Live preview tests', () => { environment: 'environment', live_preview: { enable: true, - management_token: 'management_token' + management_token: 'management_token', + host: 'api.contentstack.io' } }) const livePreviewObject = stack.config.live_preview @@ -38,13 +39,14 @@ describe('Live preview tests', () => { environment: 'environment', live_preview: { enable: false, - management_token: 'management_token' + management_token: 'management_token', + host: 'api.contentstack.io' } }) const livePreviewObject = stack.config.live_preview expect(livePreviewObject).not.toBeUndefined(); expect(livePreviewObject).toHaveProperty('enable'); - expect(livePreviewObject).not.toHaveProperty('host'); + expect(livePreviewObject).toHaveProperty('host'); expect(livePreviewObject).not.toHaveProperty('preview'); expect(stack.config.host).toBe('cdn.contentstack.io'); }); @@ -56,14 +58,16 @@ describe('Live preview tests', () => { environment: 'environment', live_preview: { enable: true, - preview_token: 'preview_token' + preview_token: 'preview_token', + host: 'rest-preview.contentstack.com' } }) const livePreviewObject = stack.config.live_preview expect(livePreviewObject).not.toBeUndefined(); expect(livePreviewObject).toHaveProperty('enable'); expect(livePreviewObject).toHaveProperty('host'); - expect(livePreviewObject).not.toHaveProperty('preview'); + expect(livePreviewObject).toHaveProperty('preview_token'); + expect(livePreviewObject).not.toHaveProperty('management_token'); expect(stack.config.host).toBe('rest-preview.contentstack.com'); });