dom-compare icon indicating copy to clipboard operation
dom-compare copied to clipboard

fix jsdom undefined nodeType for attributes

Open chiptus opened this issue 8 years ago • 7 comments
trafficstars

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.

chiptus avatar Apr 26 '17 07:04 chiptus

Coverage Status

Coverage increased (+0.5%) to 92.308% when pulling bce38ddb7898ae2f91a8ba2da5aef74d1f2db3b4 on chiptus:master into ac6eb6f05691b4efa2306d10533c17629e078c7d on Olegas:master.

coveralls avatar Apr 26 '17 07:04 coveralls

Coverage Status

Coverage increased (+0.5%) to 92.308% when pulling 63d8dedec3aa7c4de4bfb7a45503b082894e00bb on chiptus:master into ac6eb6f05691b4efa2306d10533c17629e078c7d on Olegas:master.

coveralls avatar Apr 26 '17 08:04 coveralls

@chiptus Let's remove last commit there are code style changes are made. It is not clean where is the main changes are.

Olegas avatar Apr 27 '17 19:04 Olegas

reverted the changes and made the hotfix without style changes.

chiptus avatar Apr 30 '17 11:04 chiptus

Coverage Status

Coverage decreased (-1.1%) to 90.65% when pulling 3d86a79addf7ec541cdcb180aadfd12dac28c024 on chiptus:master into 4fbf2041cb5cc3e150440cec736e27e6dce442a5 on Olegas:master.

coveralls avatar Apr 30 '17 11:04 coveralls

Coverage Status

Coverage decreased (-1.1%) to 90.65% when pulling 3d86a79addf7ec541cdcb180aadfd12dac28c024 on chiptus:master into 4fbf2041cb5cc3e150440cec736e27e6dce442a5 on Olegas:master.

coveralls avatar Apr 30 '17 11:04 coveralls

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.

Olegas avatar May 01 '17 19:05 Olegas