Merge pull request #10245 from overleaf/em-object-persistor-promises-api

Use Node 16 promises APIs in object-persistor

GitOrigin-RevId: 8520da0c0678c17b22a9164d15d61c2b57af8f4e
This commit is contained in:
Eric Mc Sween
2022-11-11 09:03:19 +00:00
committed by Copybot
parent ff944917a6
commit 8fb3edbecd
9 changed files with 108 additions and 76 deletions
@@ -1,8 +1,9 @@
const chai = require('chai')
const { expect } = chai
const SandboxedModule = require('sandboxed-module')
const StreamPromises = require('stream/promises')
const modulePath = '../../src/PersistorFactory.js'
const MODULE_PATH = '../../src/PersistorFactory.js'
describe('PersistorManager', function () {
let PersistorFactory, FSPersistor, S3Persistor, Settings, GcsPersistor
@@ -33,8 +34,9 @@ describe('PersistorManager', function () {
info() {},
err() {},
},
'stream/promises': StreamPromises,
}
PersistorFactory = SandboxedModule.require(modulePath, { requires })
PersistorFactory = SandboxedModule.require(MODULE_PATH, { requires })
})
it('should implement the S3 wrapped method when S3 is configured', function () {