bower/decompress-zip — pull request #37 by szwacz (2014-09-22 19:00:14+00:00)
Title: Tests refactoring

As conversation in https://github.com/bower/decompress-zip/pull/32 went, here are refactored unit tests.

Main improvements:
1. Zip files are stored inside this repo
2. There are as small amount of test files as possible
3. Tests are runnable on Windows

The idea:
Next to test package we are also storing recipie how to build this zip package, and explanation what it tests. In current tests there is no info what which zip file actually tries to test (what is confusing as hell). Every test pack contains also json file which specs content inside the zip file, so we have one object to test uncompressed files against.
For testing I'm using [my own library](https://github.com/szwacz/fs-jetpack) because it is perfect fit for this job. The lib is quite young still, but I give lifetime guarantee ;).

Code coverage:
There were many files used with previous tests, but all of them were collected in manner "just put together couple of common archives and call it a day", so to my surprise I achieved higher code coverage with only two, better designed zip files.

Coverage of old tests:
```
Statements : 77.13% ( 253/328 )
Branches : 65.52% ( 57/87 )
Functions : 67.19% ( 43/64 )
Lines : 77.13% ( 253/328 )
```

Coverage after refactoring:
```
Statements : 78.77% ( 256/325 )
Branches : 57.47% ( 50/87 )
Functions : 71.88% ( 46/64 )
Lines : 78.77% ( 256/325 )
```

So I stopped with only those two zips. If you want to raise code coverage higher we need to know what we actually have to test. Just throwing next zips on the pile as previous tests shows is not very effective.