dom-compare
dom-compare copied to clipboard
fix jsdom undefined nodeType for attributes
I added a quickfix for cases where nodeType is undefined. it will check that the objects has the same constructor - meaning the same Class.
fix #22
It has changes in all files because I applied prettier on the files.
Coverage increased (+0.5%) to 92.308% when pulling bce38ddb7898ae2f91a8ba2da5aef74d1f2db3b4 on chiptus:master into ac6eb6f05691b4efa2306d10533c17629e078c7d on Olegas:master.
Coverage increased (+0.5%) to 92.308% when pulling 63d8dedec3aa7c4de4bfb7a45503b082894e00bb on chiptus:master into ac6eb6f05691b4efa2306d10533c17629e078c7d on Olegas:master.
@chiptus Let's remove last commit there are code style changes are made. It is not clean where is the main changes are.
reverted the changes and made the hotfix without style changes.
Coverage decreased (-1.1%) to 90.65% when pulling 3d86a79addf7ec541cdcb180aadfd12dac28c024 on chiptus:master into 4fbf2041cb5cc3e150440cec736e27e6dce442a5 on Olegas:master.
Coverage decreased (-1.1%) to 90.65% when pulling 3d86a79addf7ec541cdcb180aadfd12dac28c024 on chiptus:master into 4fbf2041cb5cc3e150440cec736e27e6dce442a5 on Olegas:master.
I don't think this fix is sufficient. What about this line: https://github.com/Olegas/dom-compare/blob/master/lib/compare.js#L104 ?
Here we need to know the correct node type to select proper comparison strategy.