Testing Polymer components using Web Component Tester
I have started writing some real life polymer components, and I feel really bad that I haven’t been writing tests for them. In this post I’m going to teach myself how to write and run tests for polymer components so I can stop being a slacker and do some proper TDD.
Lets start by creating a little project. You can leave the defaults for the questions asked by npm init:
1
2
3
mkdir ~/test
cd ~/test
npm init
Now, lets setup bower. You can again, leave the defaults:
1
2
npm install --save-dev bower
./node_modules/bower/bin/bower init