June 2017
Intermediate to advanced
873 pages
18h 9m
English
A project should contain a number of automated tests that can be run after every code change to ensure that the previous functionality still works. Dart's unittest framework is the best tool for the job, and the Dart website has some excellent articles to get you started. However, testing Polymer web applications is a lot trickier because of the way Polymer works, as it hides HTML in shadow DOM and also because it works in an asynchronous fashion, independent of the testing code.
We will create some tests in the ClickCounter example (the standard web application template using the polymer library). You can find the code in the polymer1 app. We include the unittest library in the pubspec.yaml file, and ...
Read now
Unlock full access