Skip to content

Instantly share code, notes, and snippets.

@wataruoguchi
Created October 6, 2016 22:46
Show Gist options
  • Select an option

  • Save wataruoguchi/f1cc64e9b33d23c1397493498532cf3b to your computer and use it in GitHub Desktop.

Select an option

Save wataruoguchi/f1cc64e9b33d23c1397493498532cf3b to your computer and use it in GitHub Desktop.
  • Can we mock the DOM like ReactJS does? ReactJS renders DOM by itself. Can we mock the DOM with Jemplate? -> Cannot find Mocha is running on Node.js, can this work for jemplate? https://www.npmjs.com/package/jemplate -> It will be required loading all JS & template files

  • How is ReactJS tested? -> jsdom renders DOM

  • What kind of test? -> UI test, if the element has the class, for example

http://www.hammerlab.org/2015/02/14/testing-react-web-apps-with-mocha/ http://www.bebetterdeveloper.com/coding/getting-started-react-mocha.html https://ole.michelsen.dk/blog/testing-reactjs-with-coverage-using-mocha-babel-istanbul.html https://github.com/tmpvar/jsdom https://github.com/rstacruz/mocha-jsdom https://semaphoreci.com/community/tutorials/testing-react-components-with-enzyme-and-mocha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment