diff --git a/components/watermark/__tests__/__snapshots__/index.test.tsx.snap b/components/watermark/__tests__/__snapshots__/index.test.tsx.snap index 264416449e20..a19ad3c7de10 100644 --- a/components/watermark/__tests__/__snapshots__/index.test.tsx.snap +++ b/components/watermark/__tests__/__snapshots__/index.test.tsx.snap @@ -44,7 +44,11 @@ exports[`Watermark MutationObserver should work properly 1`] = `
+ > +
+
`; @@ -55,7 +59,7 @@ exports[`Watermark Observe the modification of style 1`] = ` style="position: relative;" >
diff --git a/components/watermark/__tests__/index.test.tsx b/components/watermark/__tests__/index.test.tsx index 4a74e3761cfd..3d9add0c6697 100644 --- a/components/watermark/__tests__/index.test.tsx +++ b/components/watermark/__tests__/index.test.tsx @@ -91,7 +91,7 @@ describe('Watermark', () => { const target = container.querySelector('.watermark div'); await waitFakeTimer(); target?.remove(); - await waitFor(() => expect(target).toBeTruthy()); + await waitFakeTimer(); expect(container).toMatchSnapshot(); }); @@ -102,7 +102,7 @@ describe('Watermark', () => { const target = container.querySelector('.watermark div'); await waitFakeTimer(); target?.setAttribute('style', ''); - await waitFor(() => expect(target).toBeTruthy()); + await waitFakeTimer(); expect(container).toMatchSnapshot(); });