-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #62 from Grizzelbee/Dev_0.7.3
Dev 0.7.3
- Loading branch information
Showing
7 changed files
with
221 additions
and
177 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 |
---|---|---|
|
@@ -81,6 +81,31 @@ describe('dysonUtils => decryptMqttPasswd', () => { | |
it.skip('should verify decrypt MQTT password mechanism', () => {}); | ||
}); | ||
|
||
|
||
describe('dysonUtils => maskConfig', () => { | ||
it('should mask Password while not modifying the rest', () => { | ||
const expectedTemperaturUnit = 'C'; | ||
const expectedPollInterval = 60; | ||
const expectedCountry = 'DE'; | ||
const expectedEmail = '[email protected]'; | ||
|
||
const config = { | ||
temperatureUnit: expectedTemperaturUnit, | ||
pollInterval: expectedPollInterval, | ||
country: expectedCountry, | ||
email: expectedEmail, | ||
Password: 'SecretPassword' | ||
}; | ||
const maskedConfig = dysonUtils.maskConfig(config); | ||
|
||
expect(maskedConfig.Password).to.equal("(***)", "Password wasn't masked to expected value"); | ||
expect(maskedConfig.temperatureUnit).to.equal(expectedTemperaturUnit); | ||
expect(maskedConfig.pollInterval).to.equal(expectedPollInterval); | ||
expect(maskedConfig.country).to.equal(expectedCountry); | ||
expect(maskedConfig.email).to.equal(expectedEmail); | ||
}); | ||
}); | ||
|
||
describe('dysonUtils => parseDysonMsgPayload', () => { | ||
// TODO See adapter.processMsg() for now, considering migration to separate message parser later | ||
|
||
|
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.