svg-pathdata
Version:
Manipulate SVG path data (path[d] attribute content) simply and efficiently.
16 lines (14 loc) • 395 B
text/typescript
import { describe, test } from '@jest/globals';
import { SVGPathData } from '../index.js';
import { assertThrows } from './testUtils.js';
describe('SVGPathDataParser', () => {
test('should fail when a bad command is given', () => {
assertThrows(
() => {
SVGPathData.parse('b80,20');
},
SyntaxError,
'Unexpected character "b" at index 0.',
);
});
});