MCPcopy Create free account
hub / github.com/deepnote/vscode-deepnote / verifySetting

Function verifySetting

src/platform/common/configuration/service.base.ts:56–86  ·  view source on GitHub ↗
(
        configSection: WorkspaceConfiguration,
        target: ConfigurationTarget,
        settingName: string,
        value?: {}
    )

Source from the content-addressed store, hash-verified

54 }
55
56 private async verifySetting(
57 configSection: WorkspaceConfiguration,
58 target: ConfigurationTarget,
59 settingName: string,
60 value?: {}
61 ): Promise<void> {
62 if (isTestExecution() && !isUnitTestExecution()) {
63 let retries = 0;
64 do {
65 const setting = configSection.inspect(settingName);
66 if (!setting && value === undefined) {
67 break; // Both are unset
68 }
69 if (setting && value !== undefined) {
70 // Both specified
71 const actual =
72 target === ConfigurationTarget.Global
73 ? setting.globalValue
74 : target === ConfigurationTarget.Workspace
75 ? setting.workspaceValue
76 : setting.workspaceFolderValue;
77 if (actual === value) {
78 break;
79 }
80 }
81 // Wait for settings to get refreshed.
82 await new Promise((resolve) => setTimeout(resolve, 250));
83 retries += 1;
84 } while (retries < 20);
85 }
86 }
87}

Callers

nothing calls this directly

Calls 3

isTestExecutionFunction · 0.90
isUnitTestExecutionFunction · 0.90
inspectMethod · 0.45

Tested by

no test coverage detected