Testing AJAX with Web Component Tester -- Polycasts #37
Channel: Chrome for Developers
Date: 16/12/2015

Elements that need to get data from a backend service can be tricky to test. Do you need to startup your own test server just to verify an element does what it's supposed to? Is that even a good idea? Today on Polycasts I'll show you have to use Web Component Tester and a library called Sinon.js to mock your back end and speed up your unit tests. By mocking your backend you can verify that your element's work in isolation, which is a crucial step to having good overall test coverage of your app.

Web Component Tester
https://github.com/Polymer/web-component-tester

Iron Ajax
https://github.com/PolymerElements/iron-ajax

Sinon.js
http://sinonjs.org/

Chai Expect
http://chaijs.com/api/bdd/

Polymer Slack: http://bit.ly/polymerslack

Subscribe to the Chrome Developers channel at http://goo.gl/LLLNvf