Add client-side testing framework.

Fixes #21.