fix: hide sensitive info for Buffer and undefined

This commit is contained in:
Pierre Vanduynslager
2018-01-27 18:24:24 -05:00
parent cb36dd4890
commit 8b3605dd04
2 changed files with 13 additions and 8 deletions
+8
View File
@@ -32,3 +32,11 @@ test.serial('Escape regexp special characters', t => {
'https://user:[secure]@host.com'
);
});
test.serial('Accept "undefined" input', t => {
t.is(require('../lib/hide-sensitive')(), undefined);
});
test.serial('Return same string if no environment variable has to be replaced', t => {
t.is(require('../lib/hide-sensitive')('test'), 'test');
});