(
configSection: WorkspaceConfiguration,
target: ConfigurationTarget,
settingName: string,
value?: {}
)
| 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 | } |
nothing calls this directly
no test coverage detected