* Rename the parameter to fit with the doc (https://github.com/jakerella/jquery-mockjax/#callback)

This commit is contained in:
Jean-Philippe Lachance
2016-09-06 18:41:35 -04:00
parent 762c57262d
commit 0bc8dbd7d9
2 changed files with 3 additions and 3 deletions

View File

@@ -171,10 +171,10 @@ class Tests {
let settings: MockJaxSettings = {
url: '/async-response-callback',
response: (settings, callback) => {
response: (settings, completed) => {
setTimeout(() => {
settings.responseText = settings.data.response + ' 3';
callback();
completed();
}, 10);
}
};

View File

@@ -22,7 +22,7 @@ interface MockJaxSettings {
isTimeout?: boolean;
dataType?: string;
contentType?: string;
response?: (settings: any, callback?: Function) => void;
response?: (settings: any, done?: Function) => void;
responseText?: string | Object;
responseXml?: string;
proxy?: string;