import { expect } from 'chai' ; import { NodeId } from '../Identifiers' ; import { makeEmptyNode , makeTestNode , deepCompareNodes } from './utilities/TestUtilities' ; describe ( 'deepCompareNodes' , ( ) => { it ( 'correctly compares two empty nodes' , ( ) => { const nodeId = '8d39e7ee-890a-4443-aef7-16d7e8ef3de0' as NodeId ; expect ( deepCompareNodes ( makeEmptyNode ( nodeId ) , makeEmptyNode ( nodeId ) ) ) . to . be . true ; } ) ; it ( 'correctly compares two deeply equal nodes' , ( ) => { const nodeId = 'a5946b8c-fb40-4631-81c8-c5473da50359' as NodeId ; expect ( deepCompareNodes ( makeTestNode ( nodeId ) , makeTestNode ( nodeId ) ) ) . to . be . true ; } ) ; it ( 'returns false for unequal nodes' , ( ) => { const nodeId = '30df2134-f347-494b-9f47-ddc9a73f227b' as NodeId ; expect ( deepCompareNodes ( makeEmptyNode ( ) , makeEmptyNode ( ) ) ) . to . be . false ; expect ( deepCompareNodes ( makeEmptyNode ( nodeId ) , makeTestNode ( nodeId ) ) ) . to . be . false ; expect ( deepCompareNodes ( makeEmptyNode ( ) , makeTestNode ( ) ) ) . to . be . false ; expect ( deepCompareNodes ( makeTestNode ( ) , makeEmptyNode ( ) ) ) . to . be . false ; } ) ; } ) ;