Lint cleanup for tests
This commit is contained in:
@@ -263,9 +263,12 @@ asyncTest('subscribe barrier', function() {
|
||||
// We are validating that the message event generated by the subscribe
|
||||
// call has already been processed by the time this promise fires
|
||||
equal(cosmo.getMessages(subject).length, 1, 'one message');
|
||||
equal(cosmo.getMessages(subject)[0]['subject']['name'], subject, 'subject matches');
|
||||
equal(cosmo.getMessages(subject)[0]['message'], message, 'message matches');
|
||||
deepEqual(cosmo.getMessages(subject)[0], cosmo.getLastMessage(subject), 'getLastMessage works');
|
||||
equal(cosmo.getMessages(subject)[0]['subject']['name'], subject,
|
||||
'subject matches');
|
||||
equal(cosmo.getMessages(subject)[0]['message'], message,
|
||||
'message matches');
|
||||
deepEqual(cosmo.getMessages(subject)[0], cosmo.getLastMessage(subject),
|
||||
'getLastMessage works');
|
||||
cosmo.shutdown();
|
||||
start();
|
||||
});
|
||||
@@ -440,7 +443,7 @@ asyncTest('pin/unpin', function() {
|
||||
cosmo.shutdown();
|
||||
start();
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
var cosmo = new Cosmopolite(callbacks, null, randstring());
|
||||
cosmo.subscribe(subject);
|
||||
@@ -471,7 +474,7 @@ asyncTest('Repin', function() {
|
||||
equal(subject, e['subject']['name'], 'onUnpin: subject matches');
|
||||
equal(message, e['message'], 'onUnpin: message matches');
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
var cosmo = new Cosmopolite(callbacks, null, randstring());
|
||||
cosmo.subscribe(subject);
|
||||
@@ -505,7 +508,7 @@ asyncTest('Duplicate subject', function() {
|
||||
start();
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
var cosmo = new Cosmopolite(callbacks, null, randstring());
|
||||
});
|
||||
@@ -524,7 +527,9 @@ asyncTest('Login', function() {
|
||||
ok(true, 'onLogout fired');
|
||||
anonymousProfile = cosmo.currentProfile();
|
||||
// Entirely magic URL that sets the login cookie and redirects.
|
||||
window.open('/_ah/login?email=test%40example.com&action=Login&continue=/cosmopolite/static/login_complete.html');
|
||||
window.open(
|
||||
'/_ah/login?email=test%40example.com&action=Login' +
|
||||
'&continue=/cosmopolite/static/login_complete.html');
|
||||
},
|
||||
'onLogin': function(login_url) {
|
||||
ok(true, 'onLogin fired');
|
||||
@@ -559,7 +564,9 @@ asyncTest('Profile merge', function() {
|
||||
if (messages == 1) {
|
||||
cosmo.unsubscribe(subject);
|
||||
// Entirely magic URL that sets the login cookie and redirects.
|
||||
window.open('/_ah/login?email=test%40example.com&action=Login&continue=/cosmopolite/static/login_complete.html');
|
||||
window.open(
|
||||
'/_ah/login?email=test%40example.com&action=Login' +
|
||||
'&continue=/cosmopolite/static/login_complete.html');
|
||||
}
|
||||
if (messages == 2) {
|
||||
cosmo.shutdown();
|
||||
|
||||
@@ -14,3 +14,4 @@ curl \
|
||||
echo
|
||||
|
||||
gjslint --strict --disable=0121,0233 cosmopolite.js
|
||||
gjslint --strict --disable=0121,0233 --nojsdoc test.js
|
||||
|
||||
Reference in New Issue
Block a user