mirror of
https://github.com/usebruno/bruno.git
synced 2025-08-17 17:21:30 +02:00
feat(#309): use dotenv for .env file parsing
This commit is contained in:
@ -26,16 +26,25 @@ BEEP=false
|
||||
`;
|
||||
const expected = {
|
||||
FOO: 'bar',
|
||||
BAZ: 2,
|
||||
BEEP: false
|
||||
BAZ: '2',
|
||||
BEEP: 'false'
|
||||
};
|
||||
const output = parser(input);
|
||||
expect(output).toEqual(expected);
|
||||
});
|
||||
|
||||
test('it should handle leading and trailing whitespace', () => {
|
||||
test('it should not strip leading and trailing whitespace when using quotes', () => {
|
||||
const input = `
|
||||
SPACE = value
|
||||
SPACE=" value "
|
||||
`;
|
||||
const expected = { SPACE: ' value ' };
|
||||
const output = parser(input);
|
||||
expect(output).toEqual(expected);
|
||||
});
|
||||
|
||||
test('it should strip leading and trailing whitespace when NOT using quotes', () => {
|
||||
const input = `
|
||||
SPACE= value
|
||||
`;
|
||||
const expected = { SPACE: 'value' };
|
||||
const output = parser(input);
|
||||
|
Reference in New Issue
Block a user