BuildTest code cleanup attempt
This commit is contained in:
parent
65bf4779f8
commit
61c052dda2
@ -21,13 +21,14 @@ BuildTest =
|
|||||||
firstDiff: (x, y) ->
|
firstDiff: (x, y) ->
|
||||||
x2 = x.cloneNode false
|
x2 = x.cloneNode false
|
||||||
y2 = y.cloneNode false
|
y2 = y.cloneNode false
|
||||||
if !x2.isEqualNode y2
|
return [x2, y2] unless x2.isEqualNode y2
|
||||||
return [x2, y2]
|
|
||||||
i = 0
|
i = 0
|
||||||
while !!(x2 = x.childNodes[i]) & !!(y2 = y.childNodes[i++])
|
while true
|
||||||
if !x2.isEqualNode y2
|
x2 = x.childNodes[i]
|
||||||
return BuildTest.firstDiff x2, y2
|
y2 = y.childNodes[i]
|
||||||
return [x2, y2]
|
return [x2, y2] unless x2 and y2
|
||||||
|
return BuildTest.firstDiff(x2, y2) unless x2.isEqualNode y2
|
||||||
|
i++
|
||||||
|
|
||||||
testOne: (post) ->
|
testOne: (post) ->
|
||||||
BuildTest.postsRemaining++
|
BuildTest.postsRemaining++
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user