feat: bru lang - jsonToBru functionality

This commit is contained in:
Anoop M D
2023-02-05 00:27:18 +05:30
parent d24f1a1054
commit 4a4208f272
9 changed files with 330 additions and 86 deletions

View File

@ -35,16 +35,4 @@ describe('utils', () => {
expect(outdentString(input)).toBe(expectedOutput);
});
});
describe('get', () => {
it('returns the value at the given path', () => {
const input = { a: { b: { c: 1 } } };
expect(get(input, 'a.b.c')).toBe(1);
});
it('returns the defaultValue if the path does not exist', () => {
const input = { a: { b: { c: 1 } } };
expect(get(input, 'a.b.d', 2)).toBe(2);
});
});
});