Qunit test cases for javascript logging

Qunit test cases for javascript logging

I am working on javascript client logging.I have function in JavaScript called WriteLog,which basically post a message/Exception to specified server URL through Ajax post and also writes a message/exception to console.log,console.error and console.warn(if available) based on type(error,warn,info passed to WriteLog function).

I am looking for reference how to write qunit testing cases for WriteLog function( to check a ajax request has been made to a server and cross verify a message written to console.log)