You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: nodeValue is not equal, but nodeType is unexpected
at Collector.collectFailure (/home/arnold/Projects/legalthings/legalform-js/node_modules/dom-compare/lib/collector.js:113:34)
at Comparator._compareAttributes (/home/arnold/Projects/legalthings/legalform-js/node_modules/dom-compare/lib/compare.js:74:36)
at Comparator.compareNode (/home/arnold/Projects/legalthings/legalform-js/node_modules/dom-compare/lib/compare.js:108:28)
at Comparator._compareNodeList (/home/arnold/Projects/legalthings/legalform-js/node_modules/dom-compare/lib/compare.js:36:23)
at Comparator.compareNode (/home/arnold/Projects/legalthings/legalform-js/node_modules/dom-compare/lib/compare.js:109:27)
at Comparator._compareNodeList (/home/arnold/Projects/legalthings/legalform-js/node_modules/dom-compare/lib/compare.js:36:23)
at Comparator.compareNode (/home/arnold/Projects/legalthings/legalform-js/node_modules/dom-compare/lib/compare.js:109:27)
at Comparator.compareNode (/home/arnold/Projects/legalthings/legalform-js/node_modules/dom-compare/lib/compare.js:106:28)
at module.exports (/home/arnold/Projects/legalthings/legalform-js/node_modules/dom-compare/lib/compare.js:137:18)
at Object.<anonymous> (/home/arnold/Projects/legalthings/legalform-js/dom-compare-tests.js:10:14)
varcompare=require('dom-compare').compare;varjsdom=require('jsdom');// Those are the HTML fragments that we want to compare:varexpectedHTML='<div class="foo"></div>';varactualHTML='<div class="bar"></div>';varexpectedDOM=jsdom.jsdom(expectedHTML);varactualDOM=jsdom.jsdom(actualHTML);varresult=compare(expectedDOM,actualDOM);console.log('diff array:',result.getDifferences());
I've dumped the actual and expected variables in collector.js and noticed they don't seem to have any properties.
console.log(expected,actual,vExpected,vActual);
yields
Attr {} Attr {} 'foo' 'bar'
The text was updated successfully, but these errors were encountered:
that's a bug in jsdom. Attr is not inherting Node and thus they don't have nodeType. we can add a quickfix that if nodeType is undefined will compare classes.
When comparing attributes, I get the error
I've dumped the
actual
andexpected
variables in collector.js and noticed they don't seem to have any properties.yields
The text was updated successfully, but these errors were encountered: