build: git context query format support
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
@@ -315,6 +315,7 @@ describe('hash', () => {
|
||||
// https://github.com/golang/go/blob/f6b93a4c358b28b350dd8fe1780c1f78e520c09c/src/strconv/atob_test.go#L36-L58
|
||||
describe('parseBool', () => {
|
||||
[
|
||||
{input: undefined, expected: false, throwsError: false},
|
||||
{input: '', expected: false, throwsError: true},
|
||||
{input: 'asdf', expected: false, throwsError: true},
|
||||
{input: '0', expected: false, throwsError: false},
|
||||
@@ -342,6 +343,13 @@ describe('parseBool', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('parseBoolOrDefault', () => {
|
||||
it('returns default value when input is invalid', () => {
|
||||
expect(Util.parseBoolOrDefault('asdf')).toBe(false);
|
||||
expect(Util.parseBoolOrDefault('asdf', true)).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('formatFileSize', () => {
|
||||
test('should return "0 Bytes" when given 0 bytes', () => {
|
||||
expect(Util.formatFileSize(0)).toBe('0 Bytes');
|
||||
|
||||
Reference in New Issue
Block a user