IonIcon giving error with vitest

While running vitest on the components using IonIcon, the test is failing with following error though the image is rendered properly in the project
Using IonIcon as: <IonIcon src="/image.svg"/>
It works fine when using ion icon with with inbuilt icons provided by ionic but causes issues when we try to use any image url with it.

Try importing the SVG:

import React from 'react';
import { IonIcon } from '@ionic/react';
import customSvg from '../../assets/svg/custom.svg';

const MyComponent: React.FC = () => (
  <IonIcon src={customSVG} size="large" />

export default MyComponent;

@ptmkenny I have tried that also…still same issue

read custom Icon section: Ionicons Usage Guide: Tips for installing and using the Ionicons free icon library

@Hills90210 I have read it…an used it as mentioned in the specifications.

i suggest then to create a simple project in stackblitz to replicate your issue and post the link for us to see.