From ebabe526321ff6ea4bad69f1fc24b26569f8ce29 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Fri, 28 Feb 2020 15:27:29 +0000 Subject: [PATCH] fix settings unit test --- services/filestore/test/unit/js/SettingsTests.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/services/filestore/test/unit/js/SettingsTests.js b/services/filestore/test/unit/js/SettingsTests.js index 4563449fde..91981c7de8 100644 --- a/services/filestore/test/unit/js/SettingsTests.js +++ b/services/filestore/test/unit/js/SettingsTests.js @@ -1,5 +1,6 @@ const chai = require('chai') const { expect } = chai +const SandboxedModule = require('sandboxed-module') describe('Settings', function() { describe('s3', function() { @@ -11,8 +12,9 @@ describe('Settings', function() { } } process.env.S3_BUCKET_CREDENTIALS = JSON.stringify(s3Settings) - - const settings = require('settings-sharelatex') + const settings = SandboxedModule.require('settings-sharelatex', { + globals: { console } + }) expect(settings.filestore.s3BucketCreds).to.deep.equal(s3Settings) }) })