提交 19c390e6 编写于 作者: J Jackson Kearl 提交者: Ramya Rao

Fix error messag bug and imporve test case (#52698)

上级 65dd9c05
......@@ -208,7 +208,7 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe
}
getWorkspaceRecommendations(): TPromise<string[]> {
if (!this.isEnabled) { return TPromise.as([]); }
if (!this.isEnabled()) { return TPromise.as([]); }
return this.fetchCombinedExtensionRecommendationConfig()
.then(content => {
......
......@@ -301,8 +301,11 @@ suite('ExtensionsTipsService Test', () => {
}
test('ExtensionTipsService: No Prompt for valid workspace recommendations when galleryService is absent', () => {
instantiationService.stub(IExtensionGalleryService, 'isEnabled', false);
return testNoPromptOrRecommendationsForValidRecommendations(mockTestData.validRecommendedExtensions);
const galleryQuerySpy = sinon.spy();
instantiationService.stub(IExtensionGalleryService, { query: galleryQuerySpy, isEnabled: () => false });
return testNoPromptOrRecommendationsForValidRecommendations(mockTestData.validRecommendedExtensions)
.then(() => assert.ok(galleryQuerySpy.notCalled));
});
test('ExtensionTipsService: No Prompt for valid workspace recommendations during extension development', () => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册