refactor(test): better initiation of globals for karma