mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-26 18:51:50 +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:
@@ -2374,6 +2374,24 @@ describe('ProjectEntityUpdateHandler', function () {
|
||||
).to.have.been.calledWith(projectId, projectHistoryId, docs, files)
|
||||
})
|
||||
})
|
||||
|
||||
describe('a project with an invalid file tree', function () {
|
||||
beforeEach(function () {
|
||||
this.callback = sinon.stub()
|
||||
this.ProjectGetter.getProject.yields(null, this.project)
|
||||
this.ProjectEntityHandler.getAllEntitiesFromProject.throws()
|
||||
this.ProjectEntityUpdateHandler.resyncProjectHistory(
|
||||
projectId,
|
||||
this.callback
|
||||
)
|
||||
})
|
||||
|
||||
it('calls the callback with an error', function () {
|
||||
expect(this.callback).to.have.been.calledWith(
|
||||
sinon.match.instanceOf(Error)
|
||||
)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('_cleanUpEntity', function () {
|
||||
|
||||
Reference in New Issue
Block a user