I've just landed a change which provides PolymerTest
, a small class that uses the new mocha BrowserTest adapter to run Mocha tests.
- loads a "blank" WebUI by default, so you have a DOM for your elements
- imports polymer and iron-test-helpers
- lets you define as many mocha tests as you want inside an individual TEST_F, so you don't have to spin up a new browser for each component you want to test
- has helpers for importing HTML
- opines that you should specify tests for components in separate files and importing them into one BrowserTest for your family of components
Thanks, and feel free to ping me with questions or suggestions, or CC me on code reviews!