With reached you mean, you get no error when doing the ajax call? If the XSJS coding described above is all in your test.xsjs, the function is not called, cause there is no call implemented.
I would expect something like following below your function in the test.xsjs file:
var sCmd = $.request.parameters.get("cmd");
if (sCmd === "myProc"){
myProc();
}
Regards,
Florian