diff --git a/index.js b/index.js index c0e47df..6f591cd 100644 --- a/index.js +++ b/index.js @@ -39,6 +39,12 @@ module.exports.create = (createOptions) => { const options = Object.assign({}, defaultOptions, createOptions); + if (!options.debug) { + console = console || {}; + console.log = () => { }; + console.error = () => { }; + } + AWS.config.update({ region: options.bucketRegion , credentials: new AWS.Credentials({ diff --git a/test.js b/test.js index efc8465..7d732f6 100644 --- a/test.js +++ b/test.js @@ -16,11 +16,12 @@ let store = require('./index').create({ , bucketName: bucketName , configDir: 'acme/' , accountsDir: 'accounts/' + , debug: true }); // All of these tests can pass locally, standalone without any ACME integration. tester.test(store).then(() => { - console.info("Test successfully completed"); + console.info("Test completed successfully."); }).catch((err) => { console.error(err.message); throw err;