Skip to content

Commit 50e9640

Browse files
committed
Remove unnecessary if blocks
1 parent 9339d5c commit 50e9640

File tree

1 file changed

+22
-28
lines changed

1 file changed

+22
-28
lines changed

packages/toolkit/src/query/tests/createApi.test-d.ts

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -217,21 +217,18 @@ describe('type tests', () => {
217217
withoutTestLifecycles: true,
218218
})
219219

220-
// only type-test this part
221-
if (2 > 1) {
222-
api1.enhanceEndpoints({
223-
endpoints: {
224-
query1: {
225-
// @ts-expect-error
226-
providesTags: ['new'],
227-
},
228-
query2: {
229-
// @ts-expect-error
230-
providesTags: ['missing'],
231-
},
220+
api1.enhanceEndpoints({
221+
endpoints: {
222+
query1: {
223+
// @ts-expect-error
224+
providesTags: ['new'],
232225
},
233-
})
234-
}
226+
query2: {
227+
// @ts-expect-error
228+
providesTags: ['missing'],
229+
},
230+
},
231+
})
235232

236233
const enhanced = api1.enhanceEndpoints({
237234
addTagTypes: ['new'],
@@ -250,21 +247,18 @@ describe('type tests', () => {
250247

251248
storeRef.store.dispatch(api1.endpoints.query2.initiate('in2'))
252249

253-
// only type-test this part
254-
if (2 > 1) {
255-
enhanced.enhanceEndpoints({
256-
endpoints: {
257-
query1: {
258-
// returned `enhanced` api contains "new" entityType
259-
providesTags: ['new'],
260-
},
261-
query2: {
262-
// @ts-expect-error
263-
providesTags: ['missing'],
264-
},
250+
enhanced.enhanceEndpoints({
251+
endpoints: {
252+
query1: {
253+
// returned `enhanced` api contains "new" entityType
254+
providesTags: ['new'],
265255
},
266-
})
267-
}
256+
query2: {
257+
// @ts-expect-error
258+
providesTags: ['missing'],
259+
},
260+
},
261+
})
268262
})
269263

270264
test('modify', () => {

0 commit comments

Comments
 (0)