Skip to content

Commit a1d9b2b

Browse files
committed
adapt test syntax to not fail on .children
... for sunburst files when reading off the d3-hierarchy output
1 parent 50922a6 commit a1d9b2b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tasks/test_syntax.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,14 @@ function assertSrcContents() {
143143
logs.push(file + ' : contains .' + lastPart + ' (IE failure)');
144144
}
145145
else if(IE_SVG_BLACK_LIST.indexOf(lastPart) !== -1) {
146-
logs.push(file + ' : contains .' + lastPart + ' (IE failure in SVG)');
146+
// add special case for sunburst where we use 'children'
147+
// off the d3-hierarchy output
148+
var dirParts = path.dirname(file).split(path.sep);
149+
var isSunburstFile = dirParts[dirParts.length - 1] === 'sunburst';
150+
var isLinkedToObject = ['pt', 'd'].indexOf(parts[parts.length - 2]) !== -1;
151+
if(!(isSunburstFile && isLinkedToObject)) {
152+
logs.push(file + ' : contains .' + lastPart + ' (IE failure in SVG)');
153+
}
147154
}
148155
else if(FF_BLACK_LIST.indexOf(lastPart) !== -1) {
149156
logs.push(file + ' : contains .' + lastPart + ' (FF failure)');

0 commit comments

Comments
 (0)