Banno / polymer-webpack-loader

WebPack Loader for Polymer Web Components
MIT License
192 stars 48 forks source link

Shimming Recipe for Web Component Tester? #73

Closed rawberg closed 6 years ago

rawberg commented 6 years ago

Trying to test components with WCT. Got the bundle loading in the test suite but none of the custom elements are available. Is there a shimming recipe to get WCT to see the elements defined in the bundle?

ChadKillingsworth commented 6 years ago

I don't have great familiarity with what WCT is expecting. How is it looking for elements? How is it referencing them?

rawberg commented 6 years ago

I'm not a WCT expert but it's expecting things to be included via html imports. I was able to get it working for now by including the component I'm testing via html imports. I think I will have to go back and remove anything inside my components that are relying on features being provided by Babel. I'll close this for now. If anybody else comes up with a better approach please add to this issue.

stefanfrede commented 6 years ago

I'm fighting with testing my component with Travis-CI and WCT, but it seems to be a tat bit too unstable. I like how WCT is included in the Polymer workflow, but I love being able to add npm Modules and optimise my component via Webpack better. So I'm asking myself what would be the best approach to test my component (I'm sadly fairly new to the whole testing stuff)? Any tips are appreciated!