I know the Polymer team uses a plugin they wrote for Karma to run tests in 
iframes. You can check it out here:
https://github.com/Polymer/core-tests/tree/master/tests

We haven't written a ton of guidance around it (though I believe Addy is 
working on an article) but the tools folder in that repo might be enough to 
get you started. Maybe give it a shot, see how far you get, and we can keep 
this thread going to work through any issues.

On Tuesday, May 20, 2014 7:37:29 AM UTC-7, keithamus wrote:
>
> I've set up a reduced test case on 
> Github<https://github.com/keithamus/polymer-karma-test>to demonstrate the 
> problem I'm having.
>
> Essentially, Karma <http://karma-runner.github.io/> isn't working with 
> Polymer - during running of the tests, Polymer complains about duplicate 
> elements being registered, however, in Karma's debug mode, and in fact 
> outside of the test environment, the polymer elements work fine.
>
> I realise that this sounds pretty much like a Karma bug, but this seems 
> like a good place to get the ball rolling at least.
>
> The error from Polymer is as follows:
>
>   Error: DuplicateDefinitionError: a type with name 'a-element' is already 
> registered
>   at 
> /Users/keith/Projects/polymer-karma-test/main/bower_components/platform/platform.js:15
>
>
> Feel free to pull the repo and have a play
>

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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/1789eefa-0c4d-4df2-b4da-b67e95f38c3b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to