diff --git a/components/carousel/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/carousel/__tests__/__snapshots__/demo-extend.test.ts.snap index ebe3c3c045..7986e72923 100644 --- a/components/carousel/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/carousel/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -12,9 +12,7 @@ Array [ @@ -110,9 +108,7 @@ Array [ @@ -162,9 +158,7 @@ Array [ @@ -261,9 +255,7 @@ Array [ @@ -305,11 +297,7 @@ Array [ ] `; -exports[`renders components/carousel/demo/arrows.tsx extend context correctly 2`] = ` -[ - "Warning: React does not recognize the \`%s\` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase \`%s\` instead. If you accidentally passed it from a parent component, remove it from the DOM element.%s", -] -`; +exports[`renders components/carousel/demo/arrows.tsx extend context correctly 2`] = `[]`; exports[`renders components/carousel/demo/autoplay.tsx extend context correctly 1`] = `
@@ -110,9 +108,7 @@ Array [ @@ -162,9 +158,7 @@ Array [ @@ -260,9 +254,7 @@ Array [ diff --git a/components/carousel/__tests__/index.test.tsx b/components/carousel/__tests__/index.test.tsx index 7e91f2d787..247736f546 100644 --- a/components/carousel/__tests__/index.test.tsx +++ b/components/carousel/__tests__/index.test.tsx @@ -178,4 +178,18 @@ describe('Carousel', () => { await waitFakeTimer(); expect(ref.current?.innerSlider.state.currentSlide).toBe(1); }); + + it('no dom recognize warning', async () => { + const errSpy = jest.spyOn(console, 'error').mockImplementation(() => {}); + render( +