You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ripple.apache.org by gt...@apache.org on 2013/03/11 16:11:04 UTC
[44/50] [abbrv] git commit: There are numerous lint errors.
There are numerous lint errors.
With the release of JSHint 1.0.0, more errors showed up, as well as a
potential parsing issue in comments with unused variables, which can be
easily cleaned up, in the meantime.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ripple/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ripple/commit/d646f67c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ripple/tree/d646f67c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ripple/diff/d646f67c
Branch: refs/heads/master
Commit: d646f67c5f563274878e7923af4a9b67da2f3542
Parents: 632a384
Author: Brent Lintner <br...@gmail.com>
Authored: Fri Mar 1 14:32:06 2013 -0500
Committer: Brent Lintner <br...@gmail.com>
Committed: Fri Mar 1 14:32:06 2013 -0500
----------------------------------------------------------------------
build/test.js | 2 +-
build/test/cov.js | 4 ++--
lib/client/platform/cordova/2.0.0/spec.js | 3 ++-
.../client/webworks.tablet/systemEvent.js | 3 +--
test/unit/client/cordova/compass.js | 2 +-
test/unit/client/cordova/contacts.js | 2 +-
test/unit/client/cordova/globalization.js | 6 +++---
test/unit/client/resizer.js | 2 +-
test/unit/client/webworks.core/XMLHttpRequest.js | 6 +++---
9 files changed, 15 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/d646f67c/build/test.js
----------------------------------------------------------------------
diff --git a/build/test.js b/build/test.js
index 69d63ea..db91afe 100644
--- a/build/test.js
+++ b/build/test.js
@@ -115,7 +115,7 @@ module.exports = function (customPaths, done, opts) {
_setupEnv(function () {
var targets;
-
+
if (customPaths) {
targets = [];
customPaths.forEach(function (customPath) {
http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/d646f67c/build/test/cov.js
----------------------------------------------------------------------
diff --git a/build/test/cov.js b/build/test/cov.js
index 2d2dd25..aa4d25c 100644
--- a/build/test/cov.js
+++ b/build/test/cov.js
@@ -7,7 +7,7 @@ var childProcess = require('child_process'),
coverjs = __dirname + "/../../node_modules/coverjs/bin/cover.js",
_coveragePort = 7070,
_coverageAssets = __dirname + '/../../test/assets/cov';
-
+
function instrument(callback) {
var args = ["-r", "-o", "cov", "lib", "test", "-e", "test/assets/cov"],
cmd = childProcess.spawn(coverjs, args);
@@ -38,7 +38,7 @@ function cleanup(callback) {
module.exports = function (customPaths, done) {
instrument(function () {
- global.__$coverObject = {}; // global.window trips up use of global.__$coverObject being used
+ global.__$coverObject = {};
test(customPaths || ["cov/test"], function () {
console.log("Generating coverage report...");
http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/d646f67c/lib/client/platform/cordova/2.0.0/spec.js
----------------------------------------------------------------------
diff --git a/lib/client/platform/cordova/2.0.0/spec.js b/lib/client/platform/cordova/2.0.0/spec.js
index 9e90f17..86b327c 100644
--- a/lib/client/platform/cordova/2.0.0/spec.js
+++ b/lib/client/platform/cordova/2.0.0/spec.js
@@ -66,11 +66,12 @@ module.exports = {
var builder = cordova.require('cordova/builder'),
allTheThings = win,
+ base,
iosPlugin;
//HACK: We should really start using platform versions for this
try {
- var base = cordova.require('cordova/common');
+ base = cordova.require('cordova/common');
//HACK: Overwrite all the things, handles when cordova.js executes before we start booting
if (builder.build) {
builder.build(base.objects).intoAndClobber(allTheThings);
http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/d646f67c/test/integration/client/webworks.tablet/systemEvent.js
----------------------------------------------------------------------
diff --git a/test/integration/client/webworks.tablet/systemEvent.js b/test/integration/client/webworks.tablet/systemEvent.js
index e3b8220..cc2e462 100644
--- a/test/integration/client/webworks.tablet/systemEvent.js
+++ b/test/integration/client/webworks.tablet/systemEvent.js
@@ -92,8 +92,7 @@ xdescribe("webworks.tablet system event", function () {
},
function () {
expect(listener).toHaveBeenCalledWith(80);
- // TODO: why does this cause tests to fail
- //global.XMLHttpRequest = window.XMLHttpRequest = _oldXHR;
+ global.XMLHttpRequest = window.XMLHttpRequest = _oldXHR;
}
]);
});
http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/d646f67c/test/unit/client/cordova/compass.js
----------------------------------------------------------------------
diff --git a/test/unit/client/cordova/compass.js b/test/unit/client/cordova/compass.js
index f82cd2c..fb4fdc8 100644
--- a/test/unit/client/cordova/compass.js
+++ b/test/unit/client/cordova/compass.js
@@ -50,7 +50,7 @@ describe("cordova compass bridge", function () {
var success = jasmine.createSpy("success");
target.getHeading(success);
-
+
expect(geo.getPositionInfo).toHaveBeenCalled();
expect(success).toHaveBeenCalledWith({
magneticHeading: heading,
http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/d646f67c/test/unit/client/cordova/contacts.js
----------------------------------------------------------------------
diff --git a/test/unit/client/cordova/contacts.js b/test/unit/client/cordova/contacts.js
index 3f07d08..d04168f 100644
--- a/test/unit/client/cordova/contacts.js
+++ b/test/unit/client/cordova/contacts.js
@@ -103,7 +103,7 @@ describe("Cordova Contacts Bridge", function () {
expect(e).not.toHaveBeenCalled();
});
});
-
+
describe("on save", function () {
beforeEach(function () {
spyOn(db, "saveObject");
http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/d646f67c/test/unit/client/cordova/globalization.js
----------------------------------------------------------------------
diff --git a/test/unit/client/cordova/globalization.js b/test/unit/client/cordova/globalization.js
index ee70f37..d34856f 100644
--- a/test/unit/client/cordova/globalization.js
+++ b/test/unit/client/cordova/globalization.js
@@ -29,7 +29,7 @@ describe("cordova globalization bridge", function () {
glob = ripple('platform/cordova/2.0.0/bridge/globalization');
success = jasmine.createSpy("success");
fail = jasmine.createSpy("fail");
-
+
spyOn(moment, "lang").andReturn("cv");
});
@@ -675,7 +675,7 @@ describe("cordova globalization bridge", function () {
glob.numberToString(success, fail, args);
expect(success).toHaveBeenCalledWith({value: "1,255%"});
});
-
+
it("calls the success callback with the result for 0", function () {
var args = [{number: 0, options: {type: 'percent'}}];
glob.numberToString(success, fail, args);
@@ -702,7 +702,7 @@ describe("cordova globalization bridge", function () {
expect(success).toHaveBeenCalledWith({value: 123});
});
});
-
+
describe("type is decimal", function () {
var args = [{numberString: "1,234", options: {type: 'decimal'}}];
http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/d646f67c/test/unit/client/resizer.js
----------------------------------------------------------------------
diff --git a/test/unit/client/resizer.js b/test/unit/client/resizer.js
index 071a1c9..7b8e8da 100644
--- a/test/unit/client/resizer.js
+++ b/test/unit/client/resizer.js
@@ -179,7 +179,7 @@ describe("resizer", function () {
delete win.orientation;
delete window.orientation;
});
-
+
it("sets window.orientation to 0 when portrait", function () {
resizer.changeLayoutType("portrait");
expect(window.orientation).toBe(0);
http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/d646f67c/test/unit/client/webworks.core/XMLHttpRequest.js
----------------------------------------------------------------------
diff --git a/test/unit/client/webworks.core/XMLHttpRequest.js b/test/unit/client/webworks.core/XMLHttpRequest.js
index f2d8599..431b164 100644
--- a/test/unit/client/webworks.core/XMLHttpRequest.js
+++ b/test/unit/client/webworks.core/XMLHttpRequest.js
@@ -170,9 +170,9 @@ describe("webworks XMLHttpRequest", function () {
var url = "webworks://blackberry/postoffice",
xhr = new XHR(),
data = {
- the: "cat",
- in: "the",
- hat: "!!!"
+ "the": "cat",
+ "in": "the",
+ "hat": "!!!"
};
webworks.blackberry.postoffice = function (args, postData) {