yahoo/express-annotations — pull request #7 by clarle (2013-10-28 07:34:15+00:00)
Title: Increase `express-annotations` coverage to 100%

Here's a lot more tests that cover the `express-annotations` API and catch every single possible use of `app.findAll`.

I also switched the testing style to the BDD `expect`-style that we had in all of the other Modown tests, and I used more realistic use-cases in my tests instead of `/foo` and `/bar`.

Coverage is as follows:
```
Express Annotations
✓ should extend the Express app with extra methods
✓ should return the app as is if the brand is already there
#annotate
✓ should return the app instance when called
✓ should only accept route paths as strings
✓ should annotate a path correctly with an annotations object
✓ should extend existing annotations on the route
✓ should create an empty annotations object on the route if none are passed in
#findAll
With invalid routes
✓ should return an empty object if no routes were set up with annotations
✓ should return an empty object if we have no string-based routes
With valid routes
✓ should accept a string and return all routes with that given annotation property
✓ should accept an object and return all routes with those annotation key/value pairs
✓ should accept an array of annotations and return all matching routes
✓ should accept a variable number of arguments as annotation filters
✓ should accept a function and return all matching routes
✓ should return an empty object for an unmatched filter
✓ should match routes between different HTTP methods
✓ should contain the correct information inside each route

17 tests complete (22 ms)

=============================== Coverage summary ===============================
Statements : 100% ( 46/46 )
Branches : 100% ( 24/24 )
Functions : 100% ( 10/10 )
Lines : 100% ( 43/43 )
================================================================================
```