This is a post meant to help you understand pipes in Angular 2, and what better place to start than the simplest pipe possible? :)
Last night I went to the "GothamSASS" meetup group event at the ThoughtWorks NYC office (which is awesome by the way) which was about Visual Regression testing.
I've been struggling to wrap my head around how to not only test directives, but how to approach teaching others how to test directives. I've been working on this github page with examples of common AngularJS things and how to test them, and how could I even pretend the list was complete without covering directives? I was looking at two resources today that opened my eyes a little bit, and I'll try to convey what I learned in this post.
I was at the book store today, and a book caught my eye that was titled, "How Google Tests Software". To my delight, it was a book about unit testing. But it wasn't really a technical book about unit testing with any specific testing framework. It was more of a book about how Google is able to break down it's huge offering of services into small areas that over and over ship quality software fast. Page 6 of the book talks about the roles at Google; the different programming positions you could apply for if you wanted to work there. I thought this part was extremely interesting, and I couldn't help but visualize how I was doing all of these roles of my current job. It would be an interesting thought experiment to scale out the "TDD developer role" across a few people, and I really like the elegant way Google does it.
I found myself working at a place where they didn't appreciate unit testing. Worse, there were developers there who didn't even know what unit testing was! It can be very intimidating for people who are new to unit testing regardless of how much general software development they've had in the past. These days I find myself working with mostly AngularJS developers. I wanted to boil it down to something people could latch onto. A phrase that describe's (no pun intended) exactly what a spec.js file is. And so I cam up with this quote:
The posts on this site are written and maintained by Jim Lynch. About Jim...