🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

dotenv-json-complex

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dotenv-json-complex - npm Package Compare versions

Comparing version

to
1.0.4

14

index.spec.js
const env = require('./index')
describe('Environment', () => {
test('Should return undefined if env function is not called', () => {
expect(process.env.test).toBe(undefined)
})
test('Should return undefined if env function is not called', () => {
expect(process.env.test).toBe(undefined)
})
test('Should return env variables if env function is loaded', () => {
env()
expect(process.env.test).toBe('{"cukinha":"Cuka"}')
})
test('Should return env variables if env function is loaded', () => {
env()
expect(process.env.my_app_env).toBe('{"nodeEnv":"development","api":{"prefix":"/api"},"database":{"username":"foo","password":"bar","name":"awesome_db_name","host":"my_db_host"}}')
})
})
{
"name": "dotenv-json-complex",
"version": "1.0.3",
"version": "1.0.4",
"description": "Load complex enviroment variable via JSON file",

@@ -33,4 +33,4 @@ "main": "index.js",

"devDependencies": {
"jest": "^24.9.0"
"jest": "^26.6.3"
}
}