@@ -1210,7 +1210,7 @@ suite('WorkspaceConfigurationService - Folder', () => {
1210
1210
await promise ;
1211
1211
} ) ;
1212
1212
1213
- test ( 'creating workspace settings' , async ( ) => {
1213
+ test ( 'creating workspace settings' , ( ) => runWithFakedTimers ( { useFakeTimers : true } , async ( ) => {
1214
1214
await fileService . writeFile ( environmentService . settingsResource , VSBuffer . fromString ( '{ "configurationService.folder.testSetting": "userValue" }' ) ) ;
1215
1215
await testObject . reloadConfiguration ( ) ;
1216
1216
await new Promise < void > ( ( c , e ) => {
@@ -1222,9 +1222,9 @@ suite('WorkspaceConfigurationService - Folder', () => {
1222
1222
} ) ;
1223
1223
fileService . writeFile ( joinPath ( workspaceService . getWorkspace ( ) . folders [ 0 ] . uri , '.vscode' , 'settings.json' ) , VSBuffer . fromString ( '{ "configurationService.folder.testSetting": "workspaceValue" }' ) ) . catch ( e ) ;
1224
1224
} ) ;
1225
- } ) ;
1225
+ } ) ) ;
1226
1226
1227
- test ( 'deleting workspace settings' , async ( ) => {
1227
+ test ( 'deleting workspace settings' , ( ) => runWithFakedTimers ( { useFakeTimers : true } , async ( ) => {
1228
1228
await fileService . writeFile ( environmentService . settingsResource , VSBuffer . fromString ( '{ "configurationService.folder.testSetting": "userValue" }' ) ) ;
1229
1229
const workspaceSettingsResource = joinPath ( workspaceService . getWorkspace ( ) . folders [ 0 ] . uri , '.vscode' , 'settings.json' ) ;
1230
1230
await fileService . writeFile ( workspaceSettingsResource , VSBuffer . fromString ( '{ "configurationService.folder.testSetting": "workspaceValue" }' ) ) ;
@@ -1235,7 +1235,7 @@ suite('WorkspaceConfigurationService - Folder', () => {
1235
1235
} ) ;
1236
1236
assert . ok ( e . affectsConfiguration ( 'configurationService.folder.testSetting' ) ) ;
1237
1237
assert . strictEqual ( testObject . getValue ( 'configurationService.folder.testSetting' ) , 'userValue' ) ;
1238
- } ) ;
1238
+ } ) ) ;
1239
1239
1240
1240
test ( 'restricted setting is read from workspace when workspace is trusted' , async ( ) => {
1241
1241
testObject . updateWorkspaceTrust ( true ) ;
@@ -1335,15 +1335,15 @@ suite('WorkspaceConfigurationService - Folder', () => {
1335
1335
assert . ok ( event . affectsConfiguration ( 'configurationService.folder.restrictedSetting' ) ) ;
1336
1336
} ) ;
1337
1337
1338
- test ( 'adding an restricted setting triggers change event' , async ( ) => {
1338
+ test ( 'adding an restricted setting triggers change event' , ( ) => runWithFakedTimers ( { useFakeTimers : true } , async ( ) => {
1339
1339
await fileService . writeFile ( environmentService . settingsResource , VSBuffer . fromString ( '{ "configurationService.folder.restrictedSetting": "userValue" }' ) ) ;
1340
1340
testObject . updateWorkspaceTrust ( false ) ;
1341
1341
1342
1342
const promise = Event . toPromise ( testObject . onDidChangeRestrictedSettings ) ;
1343
1343
await fileService . writeFile ( joinPath ( workspaceService . getWorkspace ( ) . folders [ 0 ] . uri , '.vscode' , 'settings.json' ) , VSBuffer . fromString ( '{ "configurationService.folder.restrictedSetting": "workspaceValue" }' ) ) ;
1344
1344
1345
1345
return promise ;
1346
- } ) ;
1346
+ } ) ) ;
1347
1347
1348
1348
test ( 'remove an unregistered setting' , async ( ) => {
1349
1349
const key = 'configurationService.folder.unknownSetting' ;
0 commit comments