Test exports

Refactor tests to actually use the interface in `module.exports`, instead of exposing an untested interface while testing the underlying bindings.