-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into chore.update-gaec-api
- Loading branch information
Showing
29 changed files
with
3,250 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ test/**/*.js | |
src/util/lodash-es-core.js | ||
src/util/url-search-params.min.js | ||
dist | ||
.eslintignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
const { arePropertiesValid } = require('./util'); | ||
|
||
describe('arePropertiesValid', () => { | ||
// returns true for valid properties object with no special characters in keys | ||
it('should return true when properties object has no special characters in keys', () => { | ||
const properties = { key1: 'value1', key2: 'value2' }; | ||
const result = arePropertiesValid(properties); | ||
expect(result).toBe(true); | ||
}); | ||
|
||
// returns true for null properties input | ||
it('should return true when properties input is null', () => { | ||
const properties = null; | ||
const result = arePropertiesValid(properties); | ||
expect(result).toBe(true); | ||
}); | ||
|
||
// returns false for properties object with keys containing special characters | ||
it('should return false for properties object with keys containing special characters', () => { | ||
const properties = { | ||
key1: 'value1', | ||
'key,2': 'value2', | ||
key3: 'value3', | ||
}; | ||
expect(arePropertiesValid(properties)).toBe(false); | ||
}); | ||
|
||
// returns true for empty properties object | ||
it('should return true for empty properties object', () => { | ||
const properties = {}; | ||
expect(arePropertiesValid(properties)).toBe(true); | ||
}); | ||
|
||
// returns true for undefined properties input | ||
it('should return true for undefined properties input', () => { | ||
const result = arePropertiesValid(undefined); | ||
expect(result).toBe(true); | ||
}); | ||
|
||
// returns true for empty string properties input | ||
it('should return true for empty string properties input', () => { | ||
const result = arePropertiesValid(''); | ||
expect(result).toBe(true); | ||
}); | ||
|
||
// returns false for empty string properties input | ||
it('should return false for non object properties input', () => { | ||
const result = arePropertiesValid('1234'); | ||
expect(result).toBe(false); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.