Tests: return promises rather than use `done()` callbacks.

Fixes #500