mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 06:33:55 +01:00
Merge pull request #16821 from overleaf/em-promisify-ranges-manager
Make RangesManager synchronous GitOrigin-RevId: 46bc85d952474fa0d83f3fd1299c0a3888fcf436
This commit is contained in:
@@ -65,9 +65,7 @@ describe('UpdateManager', function () {
|
||||
}
|
||||
|
||||
this.RangesManager = {
|
||||
promises: {
|
||||
applyUpdate: sinon.stub(),
|
||||
},
|
||||
applyUpdate: sinon.stub(),
|
||||
}
|
||||
|
||||
this.SnapshotManager = {
|
||||
@@ -320,7 +318,7 @@ describe('UpdateManager', function () {
|
||||
pathname: this.pathname,
|
||||
projectHistoryId: this.projectHistoryId,
|
||||
})
|
||||
this.RangesManager.promises.applyUpdate.resolves({
|
||||
this.RangesManager.applyUpdate.returns({
|
||||
newRanges: this.updated_ranges,
|
||||
rangesWereCollapsed: false,
|
||||
})
|
||||
@@ -357,7 +355,7 @@ describe('UpdateManager', function () {
|
||||
})
|
||||
|
||||
it('should update the ranges', function () {
|
||||
this.RangesManager.promises.applyUpdate
|
||||
this.RangesManager.applyUpdate
|
||||
.calledWith(
|
||||
this.project_id,
|
||||
this.doc_id,
|
||||
@@ -444,7 +442,7 @@ describe('UpdateManager', function () {
|
||||
|
||||
describe('when ranges get collapsed', function () {
|
||||
beforeEach(async function () {
|
||||
this.RangesManager.promises.applyUpdate.resolves({
|
||||
this.RangesManager.applyUpdate.returns({
|
||||
newRanges: this.updated_ranges,
|
||||
rangesWereCollapsed: true,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user