mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
Fetch tests fixed
This commit is contained in:
@ -11,9 +11,6 @@ import timer = require("timer");
|
||||
import consoleModule = require("console");
|
||||
import xhr = require("xhr/xhr");
|
||||
import dialogs = require("ui/dialogs");
|
||||
var fetchModule = require("fetch");
|
||||
|
||||
global.moduleMerge(fetchModule, global);
|
||||
|
||||
global.setTimeout = timer.setTimeout;
|
||||
global.clearTimeout = timer.clearTimeout;
|
||||
@ -29,6 +26,10 @@ global.XMLHttpRequest = xhr.XMLHttpRequest;
|
||||
global.FormData = xhr.FormData;
|
||||
global.alert = dialogs.alert;
|
||||
|
||||
// Fetch module should be after XMLHttpRequest/FormData!
|
||||
var fetchModule = require("fetch");
|
||||
global.moduleMerge(fetchModule, global);
|
||||
|
||||
export function Deprecated(target: Object, key?: string | symbol, descriptor?: any) {
|
||||
if (descriptor) {
|
||||
var originalMethod = descriptor.value;
|
||||
@ -47,4 +48,4 @@ export function Deprecated(target: Object, key?: string | symbol, descriptor?: a
|
||||
}
|
||||
}
|
||||
|
||||
global.Deprecated = Deprecated;
|
||||
global.Deprecated = Deprecated;
|
||||
|
Reference in New Issue
Block a user