Fix the undefined JSON issue within Karma.