I am working on the MxUnit test frame work for CFML. In it, I want to check whether the return value of a function is a valid JSON or not. Currently I am using:
assertEquals(True,IsJSON(userEventItems),'The return must be json');
Is there any MXUnit function to check the assert is a JSON or not, like assertIsQuery()
in MXUnit?
According to the MXUnit built-in assertions page there is not a function. Your best bet is to test the function the way you are or by using the
assertTrue()
function