api.js tests

Adds some tests for `api.js`, and a couple of dev dependencies.