cqr-env
Version:
Have multiple env files that can be encrypted and included in version control
21 lines (17 loc) • 614 B
JavaScript
const test = require('ava')
const pkg = require('../index')
test.skip('invalid parameters', function (t) {
t.throws(() => pkg())
t.throws(() => pkg(1, 2))
t.throws(() => pkg([1, 2]))
t.throws(() => pkg({b: 2}))
t.throws(() => pkg('nofile'))
t.throws(() => pkg('tests/A/*.env.json', null))
t.throws(() => pkg('tests/A/*.env.json', null, 3))
t.throws(() => pkg('tests/A/*.env.json', 'unexisting_env_var'))
})
test('glob sanitization', function (t) {
t.notThrows(() => pkg('tests/A/*.env.json'))
t.notThrows(() => pkg('tests\\A\\*.env.json'))
t.notThrows(() => pkg('tests\\A/*.env.json'))
})