There is another problem, you can not have Hot Module Replacement working with web components because calling customElements.define('my-element', MyElement); second time will result in an error, rather than show updated component view. This is a deal killer for many developers. import MyElement from "../test-component";
customElements.define('my-element', MyElement); if (module.hot) { module.hot.accept('../test-component', function() { console.log('Accepting the updated testComponent module!'); customElements.define('my-element', MyElement); }); } On Monday, November 17, 2014 at 10:47:15 PM UTC+2, pie....@gmail.com wrote: > > I have looked into Polymer a lot and plan to start a small project with it > soon. > However, I'm really concerned with testing as I would like to build my > components > by the FIRST principle http://www.addyosmani.com/firs/index.html. While > Polymer seem to solve the first four (Focused, Independent, Reusable, > Small) > very good but it seems to struggle with the last one (Testable). > > While web-component-tester provides a way of unit-testing components it > doesn't > seem to provide the answer to Mocking and thus very much limits the > testability > of components. > > Mocking HTTP, Websocket, Geolocation and similar is crucial but it would > also > be very good to be able to mock sub components so that tests of components > that composit other components doesn't become integration tests. > > Is there anything I have missed or is this a missing part in Polymer and > Web Components? > Follow Polymer on Google+: plus.google.com/107187849809354688692 --- You received this message because you are subscribed to the Google Groups "Polymer" group. To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/6cfdcf25-ba90-46f8-afcc-848ad09864a6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.