Add warning about jsDOM
Closed this issue · 2 comments
You should warn people about jsDOM. In many cases what is supported by jsDOM are not supported by browsers. Meaning server side tests with jsDOM can all be green, but soon as you test them in a browser environment, they fail.
Too many examples to write them all here, but I mentioned this because I once again ran into this issue:
AssertionError: expected '<div style="transition: none 0s ease 0s ;"></div>' to deeply equal '<div></div>'AssertionError@http://xxx/node_modules/chai/chai.js:5146:18
It works just fine on server side with jsDOM, but not browser side.
I mention this because of this ticket #234
PRs welcome!
@jmeas Option could be to use Karma, and use two different environments. One for server and one for browser. For browser phantomJS, Chrome, FF etc. and note about this in the readme.
That is the solution I'm using just now to avoid this.
Another solution could be to use testem
https://github.com/airportyh/testem
I haven't tried that one, so no experience except I know testem supports more things then jsDOM.