Merge pull request #3495 from overleaf/ae-prettier-2

Upgrade Prettier to v2

GitOrigin-RevId: 85aa3fa1acb6332c4f58c46165a43d1a51471f33
This commit is contained in:
Alf Eaton
2021-04-15 02:05:22 +00:00
committed by Copybot
parent 930d7ba028
commit 1ebc8a79cb
582 changed files with 20382 additions and 20374 deletions
@@ -13,16 +13,16 @@ import { expect } from 'chai'
import displayNameForUser from '../../../../../frontend/js/ide/history/util/displayNameForUser'
export default describe('displayNameForUser', function() {
beforeEach(function() {
export default describe('displayNameForUser', function () {
beforeEach(function () {
return (window.user = { id: 42 })
})
it("should return 'Anonymous' with no user", function() {
it("should return 'Anonymous' with no user", function () {
return expect(displayNameForUser(null)).to.equal('Anonymous')
})
it("should return 'you' when the user has the same id as the window", function() {
it("should return 'you' when the user has the same id as the window", function () {
return expect(
displayNameForUser({
id: window.user.id,
@@ -33,7 +33,7 @@ export default describe('displayNameForUser', function() {
).to.equal('you')
})
it('should return the first_name and last_name when present', function() {
it('should return the first_name and last_name when present', function () {
return expect(
displayNameForUser({
id: window.user.id + 1,
@@ -44,7 +44,7 @@ export default describe('displayNameForUser', function() {
).to.equal('James Allen')
})
it('should return only the firstAname if no last_name', function() {
it('should return only the firstAname if no last_name', function () {
return expect(
displayNameForUser({
id: window.user.id + 1,
@@ -55,7 +55,7 @@ export default describe('displayNameForUser', function() {
).to.equal('James')
})
it('should return the email username if there are no names', function() {
it('should return the email username if there are no names', function () {
return expect(
displayNameForUser({
id: window.user.id + 1,
@@ -66,7 +66,7 @@ export default describe('displayNameForUser', function() {
).to.equal('james.allen')
})
it("should return the '?' if it has nothing", function() {
it("should return the '?' if it has nothing", function () {
return expect(
displayNameForUser({
id: window.user.id + 1,