Skip to content

Commit b013236

Browse files
fix: removed redundancy of config.live_preview
1 parent 6e81cb1 commit b013236

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

src/lib/stack.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export class Stack {
1515
constructor(client: AxiosInstance, config: StackConfig) {
1616
this._client = client;
1717
this.config = config;
18-
this.config.live_preview = config.live_preview
1918
}
2019

2120
/**

test/api/live-preview.spec.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ describe('Live preview query Entry API tests', () => {
105105
}
106106
})
107107
stack.livePreviewQuery({
108-
contentTypeUid: "contentTypeUid",
109-
live_preview: "ser",
108+
contentTypeUid: 'contentTypeUid',
109+
live_preview: 'ser',
110110
})
111111
const result = await stack.ContentType('contentTypeUid').Entry('entryUid').fetch<TEntry>();
112112
expect(result).toBeDefined();
@@ -123,13 +123,13 @@ describe('Live preview query Entry API tests', () => {
123123
deliveryToken: process.env.DELIVERY_TOKEN as string,
124124
environment: process.env.ENVIRONMENT as string,
125125
live_preview: {
126-
enable: true,
126+
enable: false,
127127
management_token: 'management_token'
128128
}
129129
})
130130
stack.livePreviewQuery({
131-
contentTypeUid: "contentTypeUid",
132-
live_preview: "ser",
131+
contentTypeUid: 'contentTypeUid',
132+
live_preview: 'ser',
133133
})
134134
const result = await stack.ContentType('contentTypeUid').Entry('entryUid').fetch<TEntry>();
135135
expect(result).toBeDefined();
@@ -151,8 +151,8 @@ describe('Live preview query Entry API tests', () => {
151151
}
152152
})
153153
stack.livePreviewQuery({
154-
contentTypeUid: "contentTypeUid",
155-
live_preview: "ser",
154+
contentTypeUid: 'contentTypeUid',
155+
live_preview: 'ser',
156156
})
157157
const result = await stack.ContentType('contentTypeUid').Entry('entryUid').fetch<TEntry>();
158158
expect(result).toBeDefined();

0 commit comments

Comments
 (0)