Created
March 13, 2010 07:44
-
-
Save Marak/331192 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for( aTest in tests){ | |
//$('#testHTML').html(Tree.build(tests)); | |
var jsonRPCWrapper ={}; | |
jsonRPCWrapper.method = tests[aTest].method; | |
jsonRPCWrapper.params = [tests[aTest].params.data]; | |
jsonRPCWrapper.id = new Date().getTime(); | |
Sexy | |
// Instantiates a Sexy object and executes its json() method | |
.json({"url":"/api","type":"POST","data":JSON.stringify(jsonRPCWrapper)}, function (rsp) { | |
// create new row in table for each test | |
$('#testResults').append('<tr class = "'+aTest+'"><td class = "test">'+aTest+'</td><td class = "result">'+rsp.toString()+'</td></tr>'); | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment