|
|
@@ -1,6 +1,7 @@
|
|
|
/* eslint-disable
|
|
|
mocha/no-nested-tests,
|
|
|
*/
|
|
|
+const { expect } = require('chai')
|
|
|
const SandboxedModule = require('sandboxed-module')
|
|
|
const sinon = require('sinon')
|
|
|
const modulePath = require('node:path').join(
|
|
|
@@ -206,6 +207,22 @@ describe('HistoryManager', function () {
|
|
|
]
|
|
|
})
|
|
|
|
|
|
+ describe('error', function () {
|
|
|
+ it('should throw directly', async function () {
|
|
|
+ const err = new Error()
|
|
|
+ this.DocumentManager.promises.resyncDocContentsWithLock.rejects(err)
|
|
|
+ await expect(
|
|
|
+ this.HistoryManager.promises.resyncProjectHistory(
|
|
|
+ this.project_id,
|
|
|
+ this.projectHistoryId,
|
|
|
+ this.docs,
|
|
|
+ this.files,
|
|
|
+ {}
|
|
|
+ )
|
|
|
+ ).to.be.rejectedWith(err)
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
describe('full sync', function () {
|
|
|
beforeEach(async function () {
|
|
|
await this.HistoryManager.promises.resyncProjectHistory(
|