1

I have a method that contains a console.log() statement. For the sake of the question, let's say that it is this:

$scope.logInput = function(input) {
    console.log("Input was " + input);
};

How can I write a unit test using Jasmine that will confirm that the console log is working? I don't see any obvious way of intercepting console data or checking the contents of it.

Thunderforge
  • 19,637
  • 18
  • 83
  • 130
  • 1
    http://stackoverflow.com/questions/19825020/how-can-i-use-jasmine-js-to-test-for-console-output – Joey Mar 18 '15 at 16:02

0 Answers0