diff --git a/packages/icons/src/__tests__/index.test.tsx b/packages/icons/src/__tests__/index.test.tsx
index d4e715a62..7e6d7ac63 100644
--- a/packages/icons/src/__tests__/index.test.tsx
+++ b/packages/icons/src/__tests__/index.test.tsx
@@ -10,4 +10,20 @@ describe('Test Icons', () => {
expect(container.firstChild).toMatchSnapshot();
});
});
+
+ it('icon path referenced id should start with `ant-web3-icon-`', async () => {
+ const comps = await getComponents('components');
+
+ comps.forEach((Comp) => {
+ const { container } = render();
+
+ const pathWithFill = container.querySelectorAll('path[fill^="url(#"]');
+
+ // The `id` referenced by the `fill` attr of the `path` element
+ // must start with `ant-web3-icon-`
+ pathWithFill.forEach((path) => {
+ expect(path.getAttribute('fill')).toMatch(/^url\(#ant-web3-icon-/);
+ });
+ });
+ });
});