Fixed tests running in karma.