refactor build process to use Karma for all tests