mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-30 20:31:34 +02:00
Merge pull request #12848 from overleaf/bg-fix-path-exception
add exception handling for path.join in ProjectEntityHandler GitOrigin-RevId: dad305057fd6b2821525ca5b6d1933824989e241
This commit is contained in:
@@ -1558,6 +1558,17 @@ describe('ProjectController', function () {
|
||||
}
|
||||
this.ProjectController.projectEntitiesJson(this.req, this.res, this.next)
|
||||
})
|
||||
|
||||
it('should call next with an error if the project file tree is invalid', function (done) {
|
||||
this.ProjectEntityHandler.getAllEntitiesFromProject = sinon
|
||||
.stub()
|
||||
.throws()
|
||||
this.next = err => {
|
||||
expect(err).to.be.an.instanceof(Error)
|
||||
done()
|
||||
}
|
||||
this.ProjectController.projectEntitiesJson(this.req, this.res, this.next)
|
||||
})
|
||||
})
|
||||
|
||||
describe('_buildProjectViewModel', function () {
|
||||
|
||||
Reference in New Issue
Block a user