Fix karma tests.

Probably were broken by c8aed5a1fd06b4ace45c84b34b38f3e2024f77d0.
Closes #399.
Merge pull request #403 from flibbertigibbet/feature/fix-karma-test

Fix karma tests.