import { Path } from '../shapes/Path';
import { Rect } from '../shapes/Rect';
import { loadSVGFromString } from './loadSVGFromString';
describe('loadSVGFromString', () => {
it('returns successful parse of svg with use tag containing bad reference', async () => {
// in this case, ignore bad use but still load rest of svg
const str = ``;
const parsedSvg = await loadSVGFromString(str);
expect(parsedSvg.objects[0]).not.toBeNull();
if (parsedSvg.objects[0] !== null) {
expect(parsedSvg.objects[0].isType('Rect')).toBe(true);
}
});
it('returns successful parse of svg with use tag containing bad clip-path', async () => {
// in this case, load svg but ignore clip-path attribute in