-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: attentive tag bugsnag issue (#3663)
* fix: attentive tag bugsnag issue * fix: review comment addressed * fix: review comment addressed * fix: editing test caes * fix: editing test caes
- Loading branch information
1 parent
1a61675
commit 866dbf3
Showing
4 changed files
with
65 additions
and
7 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 |
---|---|---|
@@ -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