Skip to content

Commit d8103a5

Browse files
fix lint & update method name
1 parent 70bbdee commit d8103a5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/AzureAppConfigurationImpl.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ export class AzureAppConfigurationImpl implements AzureAppConfiguration {
449449
// try refresh if any of watched settings is changed.
450450
let needRefresh = false;
451451
if (this.#watchAll) {
452-
needRefresh = await this.#checkKeyValueCollectionChanged(this.#keyValueSelectors);
452+
needRefresh = await this.#checkConfigurationSettingsChange(this.#keyValueSelectors);
453453
}
454454
for (const sentinel of this.#sentinels.values()) {
455455
const response = await this.#getConfigurationSetting(sentinel, {
@@ -483,7 +483,7 @@ export class AzureAppConfigurationImpl implements AzureAppConfiguration {
483483
return Promise.resolve(false);
484484
}
485485

486-
const needRefresh = await this.#checkKeyValueCollectionChanged(this.#featureFlagSelectors);
486+
const needRefresh = await this.#checkConfigurationSettingsChange(this.#featureFlagSelectors);
487487
if (needRefresh) {
488488
await this.#loadFeatureFlags();
489489
}
@@ -497,7 +497,7 @@ export class AzureAppConfigurationImpl implements AzureAppConfiguration {
497497
* @param selectors - The @see PagedSettingSelector of the kev-value collection.
498498
* @returns true if key-value collection has changed, false otherwise.
499499
*/
500-
async #checkKeyValueCollectionChanged(selectors: PagedSettingSelector[]): Promise<boolean> {
500+
async #checkConfigurationSettingsChange(selectors: PagedSettingSelector[]): Promise<boolean> {
501501
const funcToExecute = async (client) => {
502502
for (const selector of selectors) {
503503
const listOptions: ListConfigurationSettingsOptions = {

test/refresh.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -331,22 +331,22 @@ describe("dynamic refresh", function () {
331331
refreshIntervalInMs: 2000
332332
}
333333
});
334-
334+
335335
let refreshSuccessfulCount = 0;
336336
settings.onRefresh(() => {
337337
refreshSuccessfulCount++;
338338
});
339339

340340
expect(settings).not.undefined;
341341
expect(settings.get("app.settings.fontColor")).eq("red");
342-
342+
343343
await sleepInMs(2 * 1000 + 1);
344344
await settings.refresh();
345345
expect(refreshSuccessfulCount).eq(0); // no change in feature flags, because page etags are the same.
346346

347347
// change key value
348348
restoreMocks();
349-
let changedKVs = [
349+
const changedKVs = [
350350
{ value: "blue", key: "app.settings.fontColor" },
351351
{ value: "40", key: "app.settings.fontSize" }
352352
].map(createMockedKeyValue);

0 commit comments

Comments
 (0)