dynamicsmobile
Version:
Allows development of off-line mobile and web business apps over the Dynamics Mobile platform. More info on https://www.dynamicsmobile.com
33 lines (24 loc) • 748 B
JavaScript
/* eslint-disable no-undef */
// eslint-disable-next-line @typescript-eslint/no-var-requires
const jQ = {}
const get = (path) => {
return Promise.resolve(path);
};
const when = (prom1, prom2, prom3, prom4) => {
return Promise.resolve();
};
const ajax = () => {
return jQ.Deferred();
};
//use this in the test to mockup behavior of ajax call
// const dfd = $.Deferred();
// $.ajax.mockImplementation(() => {
// return dfd.resolve("success"); // this is what your done callback will receive as argument
// });
const jQuery = {
...jQ, // We don't want to mock jQuery completely (we might want to alter $.Deferred status)
ajax,
get: get,
when: when
};
module.exports = jQuery