Edit loading spec for karma unit testing