mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-31 04:41:32 +02:00
Merge pull request #3495 from overleaf/ae-prettier-2
Upgrade Prettier to v2 GitOrigin-RevId: 85aa3fa1acb6332c4f58c46165a43d1a51471f33
This commit is contained in:
@@ -23,8 +23,8 @@ const {
|
||||
normalizeQuery
|
||||
} = require('../../../../app/src/Features/Helpers/Mongo')
|
||||
|
||||
describe('UserMembershipViewModel', function() {
|
||||
beforeEach(function() {
|
||||
describe('UserMembershipViewModel', function () {
|
||||
beforeEach(function () {
|
||||
this.UserGetter = { getUser: sinon.stub() }
|
||||
this.UserMembershipViewModel = SandboxedModule.require(modulePath, {
|
||||
requires: {
|
||||
@@ -42,8 +42,8 @@ describe('UserMembershipViewModel', function() {
|
||||
}
|
||||
})
|
||||
|
||||
describe('build', function() {
|
||||
it('build email', function() {
|
||||
describe('build', function () {
|
||||
it('build email', function () {
|
||||
const viewModel = this.UserMembershipViewModel.build(this.email)
|
||||
return expect(viewModel).to.deep.equal({
|
||||
email: this.email,
|
||||
@@ -55,7 +55,7 @@ describe('UserMembershipViewModel', function() {
|
||||
})
|
||||
})
|
||||
|
||||
it('build user', function() {
|
||||
it('build user', function () {
|
||||
const viewModel = this.UserMembershipViewModel.build(this.user)
|
||||
expect(viewModel._id).to.equal(this.user._id)
|
||||
expect(viewModel.email).to.equal(this.user.email)
|
||||
@@ -64,12 +64,12 @@ describe('UserMembershipViewModel', function() {
|
||||
})
|
||||
})
|
||||
|
||||
describe('build async', function() {
|
||||
beforeEach(function() {
|
||||
describe('build async', function () {
|
||||
beforeEach(function () {
|
||||
return (this.UserMembershipViewModel.build = sinon.stub())
|
||||
})
|
||||
|
||||
it('build email', function(done) {
|
||||
it('build email', function (done) {
|
||||
return this.UserMembershipViewModel.buildAsync(
|
||||
this.email,
|
||||
(error, viewModel) => {
|
||||
@@ -79,7 +79,7 @@ describe('UserMembershipViewModel', function() {
|
||||
)
|
||||
})
|
||||
|
||||
it('build user', function(done) {
|
||||
it('build user', function (done) {
|
||||
return this.UserMembershipViewModel.buildAsync(
|
||||
this.user,
|
||||
(error, viewModel) => {
|
||||
@@ -89,7 +89,7 @@ describe('UserMembershipViewModel', function() {
|
||||
)
|
||||
})
|
||||
|
||||
it('build user id', function(done) {
|
||||
it('build user id', function (done) {
|
||||
this.UserGetter.getUser.yields(null, this.user)
|
||||
return this.UserMembershipViewModel.buildAsync(
|
||||
ObjectId(),
|
||||
@@ -106,7 +106,7 @@ describe('UserMembershipViewModel', function() {
|
||||
)
|
||||
})
|
||||
|
||||
it('build user id with error', function(done) {
|
||||
it('build user id with error', function (done) {
|
||||
this.UserGetter.getUser.yields(new Error('nope'))
|
||||
const userId = ObjectId()
|
||||
return this.UserMembershipViewModel.buildAsync(
|
||||
|
||||
Reference in New Issue
Block a user