## Setting Up ### Installation * To install all the dependencies run `npm install`. * Then run `bower install` for `jasmine`, `jquery` and `underscore` library dependencies. * Install grunt globally, which is a Javascript Task Runner `npm install -g grunt-cli`. ### Running Tests * For testing, we use Jasmine. * Tests are written in the `test/unit` folder. Each file in the `src` directory have different test cases files associataed with them in the `test/unit` directory. The majority of the test cases that test the library as a black box are in `dom-comparator.spec.js`. * To run tests, run `grunt; testem server;` (from the root directory of the repository) * To see the final outputs open http://localhost:7357/ in the browser, open the JavaScript console and look for the `final_results` array. ### Cases which don't work * If there are multiple occurrences of a node in the DOM. For example: > `nodeA`: ```html
ORIGINAL TEXT
``` > `nodeB`: ```html
ORIGINAL TEXT
ORIGINAL TEXT
``` > Here, since there are 2 occurrences of `
ORIGINAL TEXT
` in `nodeB`, the exact match of it cannot be found in `nodeA`, due to which the resulted output is not as expected. * When the wrapping of the original node is changed. For example: > `nodeA`: ```html
ORIGINAL TEXT
``` > `nodeB`: ```html
ORIGINAL TEXT
``` > Here, since the wrapping of `nodeB` is changed (wrapped by `
...
`), the whole content in `nodeB` would be considered as inserted (because matching heirarchy is top to bottom).