提交 0c5a3da3 编写于 作者: B Benjamin Pasero

sqlite - fix tests

上级 06476f7f
......@@ -76,11 +76,11 @@ suite('Experiment Service', () => {
testConfigurationService = new TestConfigurationService();
instantiationService.stub(IConfigurationService, testConfigurationService);
instantiationService.stub(ILifecycleService, new TestLifecycleService());
instantiationService.stub(IStorageService, { get: (a, b, c) => c, getBoolean: (a, b, c) => c, set: () => { } });
instantiationService.stub(IStorageService, { get: (a, b, c) => c, getBoolean: (a, b, c) => c, store: () => { } });
setup(() => {
instantiationService.stub(IEnvironmentService, {});
instantiationService.stub(IStorageService, { get: (a, b, c) => c, getBoolean: (a, b, c) => c, set: () => { } });
instantiationService.stub(IStorageService, { get: (a, b, c) => c, getBoolean: (a, b, c) => c, store: () => { } });
});
teardown(() => {
......@@ -276,7 +276,7 @@ suite('Experiment Service', () => {
instantiationService.stub(IStorageService, {
get: (a, b, c) => a === 'experiments.experiment1' ? JSON.stringify({ state: ExperimentState.Complete }) : c,
set: (a, b, c) => { }
store: (a, b, c) => { }
});
testObject = instantiationService.createInstance(TestExperimentService);
......@@ -304,7 +304,7 @@ suite('Experiment Service', () => {
instantiationService.stub(IStorageService, {
get: (a, b, c) => a === 'experiments.experiment1' ? JSON.stringify({ enabled: true, state: ExperimentState.Run }) : c,
set: (a, b, c) => { }
store: (a, b, c) => { }
});
testObject = instantiationService.createInstance(TestExperimentService);
return testObject.getExperimentById('experiment1').then(result => {
......@@ -424,7 +424,7 @@ suite('Experiment Service', () => {
}
return c;
},
set: (a, b, c) => {
store: (a, b, c) => {
switch (a) {
case 'experiments.experiment1':
storageDataExperiment1 = JSON.parse(b);
......@@ -439,7 +439,7 @@ suite('Experiment Service', () => {
break;
}
},
delete: a => {
remove: a => {
switch (a) {
case 'experiments.experiment1':
storageDataExperiment1 = null;
......@@ -500,7 +500,7 @@ suite('Experiment Service', () => {
}
return c;
},
set: (a, b, c) => {
store: (a, b, c) => {
switch (a) {
case 'experiments.experiment1':
storageDataExperiment1 = JSON.parse(b);
......@@ -521,7 +521,7 @@ suite('Experiment Service', () => {
break;
}
},
delete: a => {
remove: a => {
switch (a) {
case 'experiments.experiment1':
storageDataExperiment1 = null;
......@@ -680,7 +680,7 @@ suite('Experiment Service', () => {
}
return c;
},
set: (a, b, c) => {
store: (a, b, c) => {
switch (a) {
case 'experiments.experiment3':
storageDataExperiment3 = JSON.parse(b);
......
......@@ -64,7 +64,7 @@ suite('Experimental Prompts', () => {
storageData = {};
instantiationService.stub(IStorageService, {
get: (a, b, c) => a === 'experiments.experiment1' ? JSON.stringify(storageData) : c,
set: (a, b, c) => {
store: (a, b, c) => {
if (a === 'experiments.experiment1') {
storageData = JSON.parse(b);
}
......
......@@ -242,7 +242,7 @@ suite('ExtensionsTipsService Test', () => {
instantiationService.stub(INotificationService, new TestNotificationService2());
testConfigurationService.setUserConfiguration(ConfigurationKey, { ignoreRecommendations: false, showRecommendationsOnlyOnDemand: false });
instantiationService.stub(IStorageService, { get: (a, b, c) => c, getBoolean: (a, b, c) => c, set: () => { } });
instantiationService.stub(IStorageService, { get: (a, b, c) => c, getBoolean: (a, b, c) => c, store: () => { } });
instantiationService.stub(IModelService, <IModelService>{
getModels(): any { return []; },
onModelAdded: onModelAddedEvent.event
......@@ -453,7 +453,7 @@ suite('ExtensionsTipsService Test', () => {
instantiationService.stub(IStorageService, {
get: storageGetterStub,
set: () => { },
store: () => { },
getBoolean: (a, _, c) => a === 'extensionsAssistant/workspaceRecommendationsIgnore' || c
});
......@@ -491,7 +491,7 @@ suite('ExtensionsTipsService Test', () => {
const ignoredExtensionId = 'Some.Extension';
instantiationService.stub(IStorageService, {
get: (a, b, c) => a === 'extensionsAssistant/ignored_recommendations' ? '["ms-vscode.vscode"]' : c,
set: (...args) => {
store: (...args) => {
storageSetterTarget(...args);
}
});
......
......@@ -28,7 +28,7 @@ suite('Workbench - GettingStarted', () => {
});
instantiation.stub(IStorageService, {
get: () => hideWelcomeSettingsValue,
set: (value) => hideWelcomeSettingsValue = value
store: (value) => hideWelcomeSettingsValue = value
});
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册