We don't have a pipe though, since in Tour of Heroes we didn't create any pipes. It uses a pipe though, the `uppercase` pipe that comes with Angular 2.
We can make our own `my-uppercase` pipe that does exactly the same as the `uppercase` pipe and test that.
Since we're getting ready to write some code we want to test, let's take this opportunity to talk just a little bit about [Test Driven Development](https://en.wikipedia.org/wiki/Test-driven_development). There's a lot written about this topic so we don't want to have an exhaustive description here, but rather a practical application.
We already know *exactly* what we want the `uppercase` pipe to do. We could say our ...expectations... of it are very well defined.
We always use expectations our expectations to guide development, but sometimes it's hard to see the forest for the trees when we're right in the middle of coding. This is especially evident in larger tasks.
So one thing we can do is put those expectations down as cold hard test code. We were going to test things manually anyway, so doing it *before* we have even one line of code isn't going to hurt.
Worst thing that can happen is have that test fail, but on the way to fixing it we'll end up creating our pipe. So in a sense, the failing test will *tell you what it wants* to pass.
We're just putting down expectations, nothing more. If we were to put them down on paper, they would look like this:
```
MyUppercasePipe
transforms "abc" to "ABC"
transforms "abc def" to "ABC DEF"
leaves "ABC DEF" unchanged
```
All we need to know to put down our expectations as code is how a pipe class looks like from the outside. From the [pipe developer guide](pipes#custom-pipes) we know that a pipe implements a `transform` method.
Putting it down as Jasmine expectations, they would look something like this:
GET http://localhost:8080/app/my-uppercase.pipe.js 404 (Not Found)
:marked
Our test failed, as expected. We're importing something that doesn't exist and our test fails saying that. All is going according to plan.
:marked
## The pipe, if you please
The test is asking for a pipe, and we shall deliver.
**Create** a `my-uppercase.pipe.ts` in `app/`.
**Stop and restart the TypeScript compiler** to ensure we compile the new file.
**Add** a basic pipe that doesn't do anything. We know how to make strings uppercase, but we since we're letting the test take the lead let's wait for it to tell us what's next. Maybe it'll surprise us.
The first two tests that passed were our old `hero` interface tests, so it makes sense that those passed. Of our three new expectations, one still passed though.
```
MyUppercasePipe
transforms "abc" to "ABC"
transforms "abc def" to "ABC DEF"
leaves "ABC DEF" unchanged
```
Ah but of course! Our simple pipe doesn't transform the input at all, and the third test expected
input to not be changed.
All we have to do now is actually transform text to uppercase in our pipe.
We tried a bit of test driven development and it seems to have guided us to success.
But it's not always feasible. For instance, sometimes we need to write tests for existing functionality, like what we're about to do with the rest of Tour of Heroes.
If we are writing new code though, writing tests might just be what we need to help us track our progress and keep the end result in sight at all times.