const chai = require('chai')
const { expect } = chai

describe('Settings', function() {
  describe('s3', function() {
    it('should use JSONified env var if present', function() {
      const s3Settings = {
        bucket1: {
          auth_key: 'bucket1_key',
          auth_secret: 'bucket1_secret'
        }
      }
      process.env.S3_BUCKET_CREDENTIALS = JSON.stringify(s3Settings)

      const settings = require('settings-sharelatex')
      expect(settings.filestore.s3BucketCreds).to.deep.equal(s3Settings)
    })
  })
})

@@ -45,16 +45,68 @@
 %7D = chai
+%0Aconst SandboxedModule = require('sandboxed-module')
 %0A%0Adescri
@@ -434,17 +434,16 @@
 ttings)%0A
-%0A
       co
@@ -457,16 +457,32 @@
 tings = 
+SandboxedModule.
 require(
@@ -502,16 +502,56 @@
 relatex'
+, %7B%0A        globals: %7B console %7D%0A      %7D
 )%0A      

fix settings unit test