Skip to content

Commit ee5d9f7

Browse files
committed
disabled eslint
1 parent 8c6b70f commit ee5d9f7

2 files changed

Lines changed: 61 additions & 49 deletions

File tree

‎src/client/languageServices/proposeLanguageServerBannerJedi.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export class ProposePylanceBannerJedi implements IPythonExtensionBanner {
8585
promptContent,
8686
Pylance.tryItNow(),
8787
Common.bannerLabelNo(),
88-
Pylance.remindMeLater(),
88+
Pylance.remindMeLater()
8989
);
9090

9191
let userAction: string;

‎src/test/testing/banners/proposeNewLanguageServerBannerJedi.unit.test.ts‎

Lines changed: 60 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ import {
1818
IExtensions,
1919
IPersistentState,
2020
IPersistentStateFactory,
21-
IPythonSettings,
21+
IPythonSettings
2222
} from '../../../client/common/types';
2323
import { Common, Pylance } from '../../../client/common/utils/localize';
2424
import {
2525
getPylanceExtensionUri,
2626
ProposeLSStateKeys,
27-
ProposePylanceBannerJedi,
27+
ProposePylanceBannerJedi
2828
} from '../../../client/languageServices/proposeLanguageServerBannerJedi';
2929

3030
import * as Telemetry from '../../../client/telemetry';
@@ -43,7 +43,7 @@ const testData: IExperimentLsCombination[] = [
4343
{ experiment: TryPylance.jediPrompt2, lsType: LanguageServerType.None, shouldShowBanner: false },
4444
{ experiment: TryPylance.jediPrompt2, lsType: LanguageServerType.Microsoft, shouldShowBanner: false },
4545
{ experiment: TryPylance.jediPrompt2, lsType: LanguageServerType.Node, shouldShowBanner: false },
46-
{ experiment: TryPylance.jediPrompt2, lsType: LanguageServerType.Jedi, shouldShowBanner: false },
46+
{ experiment: TryPylance.jediPrompt2, lsType: LanguageServerType.Jedi, shouldShowBanner: false }
4747
];
4848

4949
suite('Propose Pylance Banner To Jedi', () => {
@@ -73,7 +73,7 @@ suite('Propose Pylance Banner To Jedi', () => {
7373
.callsFake((eventName: EventName, _, properties: { userAction: string; experimentName: string }) => {
7474
telemetryEvent = {
7575
eventName,
76-
properties,
76+
properties
7777
};
7878
});
7979
});
@@ -104,32 +104,36 @@ suite('Propose Pylance Banner To Jedi', () => {
104104
});
105105
test('Do not show banner when it is disabled', async () => {
106106
appShell
107-
.setup((a) => a.showInformationMessage(
108-
anything(),
109-
typemoq.It.isValue(yes),
110-
typemoq.It.isValue(no),
111-
typemoq.It.isValue(later),
112-
))
107+
.setup((a) =>
108+
a.showInformationMessage(
109+
anything(),
110+
typemoq.It.isValue(yes),
111+
typemoq.It.isValue(no),
112+
typemoq.It.isValue(later)
113+
)
114+
)
113115
.verifiable(typemoq.Times.never());
114116
const testBanner = preparePopup(
115117
false,
116118
appShell.object,
117119
appEnv.object,
118120
config.object,
119121
TryPylance.jediPrompt1,
120-
false,
122+
false
121123
);
122124
await testBanner.showBanner();
123125
appShell.verifyAll();
124126
});
125127
test('Clicking No should disable the banner', async () => {
126128
appShell
127-
.setup((a) => a.showInformationMessage(
128-
anything(),
129-
typemoq.It.isValue(yes),
130-
typemoq.It.isValue(no),
131-
typemoq.It.isValue(later),
132-
))
129+
.setup((a) =>
130+
a.showInformationMessage(
131+
anything(),
132+
typemoq.It.isValue(yes),
133+
typemoq.It.isValue(no),
134+
typemoq.It.isValue(later)
135+
)
136+
)
133137
.returns(async () => no)
134138
.verifiable(typemoq.Times.once());
135139
appShell.setup((a) => a.openUrl(getPylanceExtensionUri(appEnv.object))).verifiable(typemoq.Times.never());
@@ -140,7 +144,7 @@ suite('Propose Pylance Banner To Jedi', () => {
140144
appEnv.object,
141145
config.object,
142146
TryPylance.jediPrompt1,
143-
false,
147+
false
144148
);
145149
await testBanner.showBanner();
146150

@@ -150,17 +154,19 @@ suite('Propose Pylance Banner To Jedi', () => {
150154
sinon.assert.calledOnce(sendTelemetryStub);
151155
assert.deepEqual(telemetryEvent, {
152156
eventName: EventName.LANGUAGE_SERVER_TRY_PYLANCE,
153-
properties: { userAction: 'no', experimentName: TryPylance.jediPrompt1 },
157+
properties: { userAction: 'no', experimentName: TryPylance.jediPrompt1 }
154158
});
155159
});
156160
test('Clicking Later should disable banner in session', async () => {
157161
appShell
158-
.setup((a) => a.showInformationMessage(
159-
anything(),
160-
typemoq.It.isValue(yes),
161-
typemoq.It.isValue(no),
162-
typemoq.It.isValue(later),
163-
))
162+
.setup((a) =>
163+
a.showInformationMessage(
164+
anything(),
165+
typemoq.It.isValue(yes),
166+
typemoq.It.isValue(no),
167+
typemoq.It.isValue(later)
168+
)
169+
)
164170
.returns(async () => later)
165171
.verifiable(typemoq.Times.once());
166172
appShell.setup((a) => a.openUrl(getPylanceExtensionUri(appEnv.object))).verifiable(typemoq.Times.never());
@@ -171,13 +177,13 @@ suite('Propose Pylance Banner To Jedi', () => {
171177
appEnv.object,
172178
config.object,
173179
TryPylance.jediPrompt1,
174-
false,
180+
false
175181
);
176182
await testBanner.showBanner();
177183

178184
expect(testBanner.enabled).to.be.equal(
179185
true,
180-
'Banner should not be permanently disabled when user clicked Later',
186+
'Banner should not be permanently disabled when user clicked Later'
181187
);
182188
appShell.verifyAll();
183189

@@ -186,18 +192,20 @@ suite('Propose Pylance Banner To Jedi', () => {
186192
eventName: EventName.BANNER_NAME_PROPOSE_LS_FOR_JEDI_USERS,
187193
properties: {
188194
userAction: 'later',
189-
experimentName: TryPylance.jediPrompt1,
190-
},
195+
experimentName: TryPylance.jediPrompt1
196+
}
191197
});
192198
});
193199
test('Clicking Yes opens the extension marketplace entry', async () => {
194200
appShell
195-
.setup((a) => a.showInformationMessage(
196-
anything(),
197-
typemoq.It.isValue(yes),
198-
typemoq.It.isValue(no),
199-
typemoq.It.isValue(later),
200-
))
201+
.setup((a) =>
202+
a.showInformationMessage(
203+
anything(),
204+
typemoq.It.isValue(yes),
205+
typemoq.It.isValue(no),
206+
typemoq.It.isValue(later)
207+
)
208+
)
201209
.returns(async () => yes)
202210
.verifiable(typemoq.Times.once());
203211
appShell.setup((a) => a.openUrl(getPylanceExtensionUri(appEnv.object))).verifiable(typemoq.Times.once());
@@ -208,7 +216,7 @@ suite('Propose Pylance Banner To Jedi', () => {
208216
appEnv.object,
209217
config.object,
210218
TryPylance.jediPrompt1,
211-
false,
219+
false
212220
);
213221
await testBanner.showBanner();
214222

@@ -220,8 +228,8 @@ suite('Propose Pylance Banner To Jedi', () => {
220228
eventName: EventName.BANNER_NAME_PROPOSE_LS_FOR_JEDI_USERS,
221229
properties: {
222230
userAction: 'yes',
223-
experimentName: TryPylance.jediPrompt1,
224-
},
231+
experimentName: TryPylance.jediPrompt1
232+
}
225233
});
226234
});
227235
});
@@ -232,7 +240,7 @@ function preparePopup(
232240
appEnv: IApplicationEnvironment,
233241
config: IConfigurationService,
234242
experiment: TryPylance,
235-
pylanceInstalled: boolean,
243+
pylanceInstalled: boolean
236244
): ProposePylanceBannerJedi {
237245
const myfactory = typemoq.Mock.ofType<IPersistentStateFactory>();
238246
const val = typemoq.Mock.ofType<IPersistentState<boolean>>();
@@ -246,16 +254,20 @@ function preparePopup(
246254
});
247255
val.setup((a) => a.value).returns(() => enabledValue);
248256
myfactory
249-
.setup((a) => a.createGlobalPersistentState(
250-
typemoq.It.isValue(ProposeLSStateKeys.ShowBannerJedi),
251-
typemoq.It.isValue(true),
252-
))
257+
.setup((a) =>
258+
a.createGlobalPersistentState(
259+
typemoq.It.isValue(ProposeLSStateKeys.ShowBannerJedi),
260+
typemoq.It.isValue(true)
261+
)
262+
)
253263
.returns(() => val.object);
254264
myfactory
255-
.setup((a) => a.createGlobalPersistentState(
256-
typemoq.It.isValue(ProposeLSStateKeys.ShowBannerJedi),
257-
typemoq.It.isValue(false),
258-
))
265+
.setup((a) =>
266+
a.createGlobalPersistentState(
267+
typemoq.It.isValue(ProposeLSStateKeys.ShowBannerJedi),
268+
typemoq.It.isValue(false)
269+
)
270+
)
259271
.returns(() => val.object);
260272

261273
const experiments = typemoq.Mock.ofType<IExperimentService>();
@@ -287,6 +299,6 @@ function preparePopup(
287299
myfactory.object,
288300
config,
289301
experiments.object,
290-
extensions.object,
302+
extensions.object
291303
);
292304
}

0 commit comments

Comments
 (0)