Fix minor style errors

And keep it that way, by making jscs config more opinionated.

// FREEBIE
This commit is contained in:
lilia 2016-02-17 17:08:50 -08:00
parent b09cb228f7
commit 173e037fa6
17 changed files with 97 additions and 38 deletions

View file

@ -56,8 +56,9 @@ function assertEqualArrayBuffers(ab1, ab2) {
function hexToArrayBuffer(str) {
var ret = new ArrayBuffer(str.length / 2);
var array = new Uint8Array(ret);
for (var i = 0; i < str.length/2; i++)
for (var i = 0; i < str.length/2; i++) {
array[i] = parseInt(str.substr(i*2, 2), 16);
}
return ret;
};

View file

@ -93,7 +93,7 @@
sent_at : Date.now(),
received_at : Date.now()
});
message.save().then(done)
message.save().then(done);
});
});
after(clearDatabase);

View file

@ -101,7 +101,7 @@ describe("AxolotlStore", function() {
var promise = Promise.resolve();
devices.forEach(function(encodedNumber) {
promise = promise.then(function() {
return store.putSession(encodedNumber, testRecord + encodedNumber)
return store.putSession(encodedNumber, testRecord + encodedNumber);
});
});
promise.then(function() {
@ -133,7 +133,7 @@ describe("AxolotlStore", function() {
var promise = Promise.resolve();
devices.forEach(function(encodedNumber) {
promise = promise.then(function() {
return store.putSession(encodedNumber, testRecord + encodedNumber)
return store.putSession(encodedNumber, testRecord + encodedNumber);
});
});
promise.then(function() {

View file

@ -1,7 +1,7 @@
describe('ListView', function() {
var collection;
beforeEach(function(){
beforeEach(function() {
collection = new Backbone.Collection();
});

View file

@ -25,7 +25,9 @@ describe('TimestampView', function() {
// Helper to check an absolute TS for an exact match against both views
var checkAbs = function(ts, expected_brief, expected_ext) {
if (!expected_ext) expected_ext = expected_brief;
if (!expected_ext) {
expected_ext = expected_brief;
}
check(brief_view, ts, expected_brief);
check(ext_view, ts, expected_ext);
};