mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
style(tests): format all files
This commit is contained in:
@@ -128,7 +128,7 @@ export var test_getJSON_fail_when_result_is_not_JSONP = function (done) {
|
||||
});
|
||||
};
|
||||
|
||||
export var test_gzip_request_explicit = function(done) {
|
||||
export var test_gzip_request_explicit = function (done) {
|
||||
var result;
|
||||
|
||||
http.request({
|
||||
@@ -136,7 +136,8 @@ export var test_gzip_request_explicit = function(done) {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Accept-Encoding": "gzip"
|
||||
}}).then(function (r) {
|
||||
}
|
||||
}).then(function (r) {
|
||||
result = r;
|
||||
try {
|
||||
TKUnit.assert(typeof (JSON.stringify(result)) === "string", "Result from gzipped stream should be valid JSON object!");
|
||||
@@ -150,12 +151,13 @@ export var test_gzip_request_explicit = function(done) {
|
||||
});
|
||||
};
|
||||
|
||||
export var test_gzip_request_implicit = function(done) {
|
||||
export var test_gzip_request_implicit = function (done) {
|
||||
var result;
|
||||
|
||||
http.request({
|
||||
url: "https://postman-echo.com/gzip",
|
||||
method: "GET"}).then(function (r) {
|
||||
method: "GET"
|
||||
}).then(function (r) {
|
||||
result = r;
|
||||
try {
|
||||
TKUnit.assert(typeof (JSON.stringify(result)) === "string", "Result from gzipped stream should be valid JSON object!");
|
||||
@@ -634,12 +636,12 @@ export var test_request_jsonAsContentSentAndReceivedProperly = function (done) {
|
||||
};
|
||||
|
||||
declare var Worker: any;
|
||||
export var test_getString_WorksProperlyInWorker = function(done) {
|
||||
export var test_getString_WorksProperlyInWorker = function (done) {
|
||||
let worker = new Worker("./http-string-worker");
|
||||
worker.onmessage = function(msg) {
|
||||
worker.onmessage = function (msg) {
|
||||
done();
|
||||
};
|
||||
worker.onerror = function(e) {
|
||||
worker.onerror = function (e) {
|
||||
done(e);
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user