import { loadSVGFromString } from './loadSVGFromString';
// Add `Circle` to the class registry, making it available during SVG parsing.
import '../shapes/Circle';
describe('getCSSRules', () => {
test('can load svgs with style tags with import statement', async () => {
const loaded =
await loadSVGFromString(``);
expect(loaded.objects).toHaveLength(2);
});
test('can load svgs with style tags with nested at-rules', async () => {
const loaded = await loadSVGFromString(`
`);
expect(loaded.objects).toHaveLength(1);
});
test('can load svgs with multiple style tags', async () => {
const loaded = await loadSVGFromString(`
`);
expect(loaded.objects[0]).toMatchObject({ fill: 'blue' });
expect(loaded.objects[1]).toMatchObject({ fill: 'red' });
});
});