Skip to content

Commit 22323f8

Browse files
committed
Ignore duplicate key warnings for TS 5.3
1 parent c391bcf commit 22323f8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/toolkit/src/query/tests/devWarnings.test.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,10 @@ describe('warns on multiple apis using the same `reducerPath`', () => {
205205
test('common: two apis, same order', async () => {
206206
const store = configureStore({
207207
reducer: {
208+
// TS 5.3 now errors on identical object keys. We want to force that behavior.
209+
// @ts-ignore
208210
[api1.reducerPath]: api1.reducer,
211+
// @ts-ignore
209212
[api1_2.reducerPath]: api1_2.reducer,
210213
},
211214
middleware: (gDM) => gDM().concat(api1.middleware, api1_2.middleware),
@@ -222,7 +225,9 @@ If you have multiple apis, you *have* to specify the reducerPath option when usi
222225
test('common: two apis, opposing order', async () => {
223226
const store = configureStore({
224227
reducer: {
228+
// @ts-ignore
225229
[api1.reducerPath]: api1.reducer,
230+
// @ts-ignore
226231
[api1_2.reducerPath]: api1_2.reducer,
227232
},
228233
middleware: (gDM) => gDM().concat(api1_2.middleware, api1.middleware),
@@ -242,7 +247,9 @@ If you have multiple apis, you *have* to specify the reducerPath option when usi
242247
test('common: two apis, only first middleware', async () => {
243248
const store = configureStore({
244249
reducer: {
250+
// @ts-ignore
245251
[api1.reducerPath]: api1.reducer,
252+
// @ts-ignore
246253
[api1_2.reducerPath]: api1_2.reducer,
247254
},
248255
middleware: (gDM) => gDM().concat(api1.middleware),
@@ -266,7 +273,9 @@ If you have multiple apis, you *have* to specify the reducerPath option when usi
266273
test.skip('common: two apis, only second middleware', async () => {
267274
const store = configureStore({
268275
reducer: {
276+
// @ts-ignore
269277
[api1.reducerPath]: api1.reducer,
278+
// @ts-ignore
270279
[api1_2.reducerPath]: api1_2.reducer,
271280
},
272281
middleware: (gDM) => gDM().concat(api1_2.middleware),

0 commit comments

Comments
 (0)