Search code examples
javascriptajaxextjsmockjax

Does mockjax could capture all ajax calls?


I am planning to use Mockjax for one of my offline applications. Will Mockjax capture the ajax calls made even by extjs or other javascript libarires?


Solution

  • That depends... if you are referring to the original mockjax jQuery plugin then it will only work with jQuery's $.ajax() method calls. That said, there are other libraries out there called "Mockjax" which do similar things.

    If you need a more "generic" solution that will work with other libraries (or just vanilla JavaScript) then I would recommend looking into the Sinon library.