Testing AJAX with Web Component Tester -- Polycasts #37

Subscribers:
791,000
Published on ● Video Link: https://www.youtube.com/watch?v=_9qARcdCAn4



Duration: 7:53
15,656 views
206


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







Tags:
Chrome
Developers
Google
Web
AJAX
Web Component Tester
Polycast
Sinon.js
Iron Ajax
Chai Expect
Polymer Slack
product: chrome
fullname: rob dodson
location: MTV
Team: scalable advocacy
team: screencast
GDS: Full Production