mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 12:03:33 -05:00
fix formatting
This commit is contained in:
parent
2a650bb1b8
commit
48bc7595a8
8 changed files with 76 additions and 74 deletions
|
@ -67,7 +67,7 @@ module.exports = ContactManager = {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
;['touchContact', 'getContacts'].map(method =>
|
;['touchContact', 'getContacts'].map((method) =>
|
||||||
metrics.timeAsyncMethod(
|
metrics.timeAsyncMethod(
|
||||||
ContactManager,
|
ContactManager,
|
||||||
method,
|
method,
|
||||||
|
|
|
@ -70,7 +70,7 @@ module.exports = HttpController = {
|
||||||
|
|
||||||
HttpController._sortContacts(contacts)
|
HttpController._sortContacts(contacts)
|
||||||
contacts = contacts.slice(0, limit)
|
contacts = contacts.slice(0, limit)
|
||||||
const contact_ids = contacts.map(contact => contact.user_id)
|
const contact_ids = contacts.map((contact) => contact.user_id)
|
||||||
|
|
||||||
return res.status(200).send({
|
return res.status(200).send({
|
||||||
contact_ids
|
contact_ids
|
||||||
|
|
|
@ -29,7 +29,7 @@ module.exports = {
|
||||||
} else {
|
} else {
|
||||||
this.initing = true
|
this.initing = true
|
||||||
this.callbacks.push(callback)
|
this.callbacks.push(callback)
|
||||||
return app.listen(3036, 'localhost', error => {
|
return app.listen(3036, 'localhost', (error) => {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
throw error
|
throw error
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,11 +66,11 @@ describe('Getting Contacts', function() {
|
||||||
return async.series(
|
return async.series(
|
||||||
[
|
[
|
||||||
// 2 is preferred since touched twice, then 3 since most recent, then 1
|
// 2 is preferred since touched twice, then 3 since most recent, then 1
|
||||||
cb => ContactsApp.ensureRunning(cb),
|
(cb) => ContactsApp.ensureRunning(cb),
|
||||||
cb => touchContact(this.user_id, this.contact_id_1, cb),
|
(cb) => touchContact(this.user_id, this.contact_id_1, cb),
|
||||||
cb => touchContact(this.user_id, this.contact_id_2, cb),
|
(cb) => touchContact(this.user_id, this.contact_id_2, cb),
|
||||||
cb => touchContact(this.user_id, this.contact_id_2, cb),
|
(cb) => touchContact(this.user_id, this.contact_id_2, cb),
|
||||||
cb => touchContact(this.user_id, this.contact_id_3, cb)
|
(cb) => touchContact(this.user_id, this.contact_id_3, cb)
|
||||||
],
|
],
|
||||||
done
|
done
|
||||||
)
|
)
|
||||||
|
|
|
@ -59,7 +59,7 @@ describe('ContactManager', function() {
|
||||||
.calledWith(
|
.calledWith(
|
||||||
{
|
{
|
||||||
user_id: sinon.match(
|
user_id: sinon.match(
|
||||||
o => o.toString() === this.user_id.toString()
|
(o) => o.toString() === this.user_id.toString()
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -115,7 +115,9 @@ describe('ContactManager', function() {
|
||||||
it("should find the user's contacts", function () {
|
it("should find the user's contacts", function () {
|
||||||
return this.db.contacts.findOne
|
return this.db.contacts.findOne
|
||||||
.calledWith({
|
.calledWith({
|
||||||
user_id: sinon.match(o => o.toString() === this.user_id.toString())
|
user_id: sinon.match(
|
||||||
|
(o) => o.toString() === this.user_id.toString()
|
||||||
|
)
|
||||||
})
|
})
|
||||||
.should.equal(true)
|
.should.equal(true)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue