refactor test.js

Introduced in 2 commits to make diffing easier:
1. remove DOS EOL characters
2. refactor code

Calls to the deleted modules dependencies, ```multiparter``` and ```mime``` were removed in ad9bd15f39781bf7fb528134d2bf96dd3ea3f64d .