Skip to content

Commit

Permalink
update tests to block style elements, and to inspect all groups in ea…
Browse files Browse the repository at this point in the history
…ch SVG
  • Loading branch information
samanpwbb committed Oct 6, 2016
1 parent 7d115e7 commit e2ece3a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/maki.test.js
Expand Up @@ -62,7 +62,7 @@ test('valid svgs ', function(t) {
invalid = false;

keys.some(function(key) {
invalid = key.match(/^(rectangle|circle|ellipse|line|polyline|polygon)$/) && key;
invalid = key.match(/^(rectangle|circle|ellipse|line|polyline|polygon|style)$/) && key;
return invalid;
});
return invalid;
Expand All @@ -77,10 +77,11 @@ test('valid svgs ', function(t) {
function traverseGroups(groupArray) {
groupArray.forEach(function(group) {
if (group.$ && group.$.transform) errors.push('transformed groups');
if (invalidElement(group)) errors.push('has ' + invalidElement(group));
if (invalidElement(group)) errors.push(' has ' + invalidElement(group));
if (group.path) {
checkPaths(group.path);
} else if (group.g) {
}
if (group.g) {
traverseGroups(group.g);
}
});
Expand Down

0 comments on commit e2ece3a

Please sign in to comment.