Recipe to test your ES6 React components.
$ npm install gulp gulp-util gulp-mocha gulp-istanbul isparta run-sequence babel jsdomNote: You must name all your files .js, even if they contains JSX, or istanbul will not instrument them.
| <head> | |
| <script> | |
| if (window.localStorage && window.localStorage._tk_cache) { | |
| document.documentElement.classList.add('wf-active'); | |
| var script = document.createElement('script'); | |
| script.innerHTML = localStorage._tk_cache + ";(function () {var timeout = setTimeout(function () {document.documentElement.classList.remove('wf-active');}, 300); Typekit.load({ async: false, active: function () { clearTimeout(timeout); }});})();"; | |
| document.head.appendChild(script); | |
| } | |
| window._tk_onload = function () { | |
| var req = new XMLHttpRequest() |