我想问一些关于 jasmine spy 的事情。通常我像这样使用间谍
function getAuthrize(id) {
$.ajax({
type: "GET",
url: "/Account/LogOn" + id,
contentType: "application/json; charset=utf-8",
dataType: "json"
});
}
spyOn($, "ajax");
getAuthrize(123);
expect($.ajax).toHaveBeenCalled();
但我想知道,如果我想验证更多的东西,比如(url
在 ajax 调用中被调用的是/Account/LogOn
,type is 'Get'
等等。
提前致谢