fix bad test

`done()` was called before the test's assertion, so nothing was being tested (and the test would have failed erroneously because `assertEqual` doesn't exist here).

Also another small change to cause a a test to fail if an unreachable spot gets hit.