Merge pull request #8035 from overleaf/em-remove-chaid

Remove the chaid package from tests

GitOrigin-RevId: 61b541eebcf1982137aa10ad51940547c649e68d
This commit is contained in:
Eric Mc Sween 2022-05-20 07:29:42 -04:00 committed by Copybot
parent 51f5f80e2d
commit e0ab82e3d4
5 changed files with 5 additions and 23 deletions

14
package-lock.json generated
View file

@ -9014,12 +9014,6 @@
"node": ">=4"
}
},
"node_modules/chaid": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/chaid/-/chaid-1.0.2.tgz",
"integrity": "sha1-9Y6UNgUoq9qkas8LOlF0oG4Vd1A=",
"dev": true
},
"node_modules/chainsaw": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz",
@ -35179,7 +35173,6 @@
"chai": "^4.3.6",
"chai-as-promised": "^7.1.1",
"chai-exclude": "^2.0.3",
"chaid": "^1.0.2",
"cheerio": "^1.0.0-rc.3",
"content-disposition": "^0.5.0",
"copy-webpack-plugin": "^10.2.4",
@ -42783,7 +42776,6 @@
"chai": "^4.3.6",
"chai-as-promised": "^7.1.1",
"chai-exclude": "^2.0.3",
"chaid": "^1.0.2",
"cheerio": "^1.0.0-rc.3",
"classnames": "^2.2.6",
"codemirror": "~5.33.0",
@ -47961,12 +47953,6 @@
"superagent": "^3.7.0"
}
},
"chaid": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/chaid/-/chaid-1.0.2.tgz",
"integrity": "sha1-9Y6UNgUoq9qkas8LOlF0oG4Vd1A=",
"dev": true
},
"chainsaw": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz",

View file

@ -228,7 +228,6 @@
"chai": "^4.3.6",
"chai-as-promised": "^7.1.1",
"chai-exclude": "^2.0.3",
"chaid": "^1.0.2",
"cheerio": "^1.0.0-rc.3",
"content-disposition": "^0.5.0",
"copy-webpack-plugin": "^10.2.4",

View file

@ -1,7 +1,6 @@
const chai = require('chai')
chai.should()
chai.use(require('chai-as-promised'))
chai.use(require('chaid'))
chai.use(require('sinon-chai'))
chai.use(require('chai-exclude'))

View file

@ -127,7 +127,7 @@ describe('ProjectStructureMongoLock', function () {
{ _id: true },
(err, project) => {
expect(err).to.equal(null)
expect(project).to.have.same.id(this.locked_project)
expect(project._id).to.deep.equal(this.locked_project._id)
return done()
}
)
@ -167,7 +167,7 @@ describe('ProjectStructureMongoLock', function () {
this.unlocked_project._id,
(err, project) => {
expect(err).to.equal(null)
expect(project).to.have.same.id(this.unlocked_project)
expect(project._id).to.deep.equal(this.unlocked_project._id)
return done()
}
)

View file

@ -31,9 +31,7 @@ describe('Sharing', function () {
{ privilegeLevel: 'readAndWrite' }
)
const project = await this.ownerSession.getProject(this.projectId)
expect(project.collaberator_refs).to.be.unordered.ids([
this.collaborator._id,
])
expect(project.collaberator_refs).to.deep.equal([this.collaborator._id])
expect(project.readOnly_refs).to.deep.equal([])
})
@ -45,7 +43,7 @@ describe('Sharing', function () {
)
const project = await this.ownerSession.getProject(this.projectId)
expect(project.collaberator_refs).to.deep.equal([])
expect(project.readOnly_refs).to.be.unordered.ids([this.collaborator._id])
expect(project.readOnly_refs).to.deep.equal([this.collaborator._id])
})
it('prevents non-owners to set the privilege level', async function () {
@ -96,7 +94,7 @@ describe('Sharing', function () {
)
const project = await this.ownerSession.getProject(this.projectId)
expect(project.collaberator_refs).to.deep.equal([])
expect(project.readOnly_refs).to.be.unordered.ids([this.collaborator._id])
expect(project.readOnly_refs).to.deep.equal([this.collaborator._id])
})
})
})