Skip to content

Commit

Permalink
fix: parse 'false' in env
Browse files Browse the repository at this point in the history
  • Loading branch information
kalinkrustev committed May 15, 2024
1 parent 59b4be6 commit a7e8c8e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/unit/lib/config.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,12 @@ Test('Config should', configTest => {

configTest.test('evaluate MONGODB_DISABLED to a boolean if a string', async function (test) {
console.log(Defaults)
const DefaultsStub = { ...Defaults }
DefaultsStub.MONGODB.DISABLED = 'true'
const Config = Proxyquire('../../../src/lib/config', {
'../../config/default.json': DefaultsStub
'../../config/default.json': { ...Defaults, MONGODB: { DISABLED: 'true', DEBUG: 'true' } }
})

test.ok(Config.MONGODB_DISABLED === true)
test.ok(Config.MONGODB_DEBUG === true)
test.end()
})

Expand Down

0 comments on commit a7e8c8e

Please sign in to comment.