Improving export and adding angular unit tests