Testing warning messages in Jasmine


#1

I have a test that specifically tests a part of the code that is supposed to log a warning message in certain circumstances. However, when I run the test via Jasmine Tester console interface, my test passes, but I don’t get the warning message I am supposed to get in the console.

I added a breakpoint, and stepped through the code line by line, and only then I did get the warning message when I hit the logger.warn() line. This can be explained by the fact that when I am in debug mode tests run on the client side, and when not in debug mode, tests run on the server.

My question is whether there is a way yo see the server logs in console (or elsewhere) and make sure that the test is indeed hitting the warning part.


#2

You can query Splunk from the platform via the Splunk type, but I am not certain that this would be the best approach to what you are trying to achieve.

Can you put in a proxy for the warning message that will show up in Jasmine?