Skip to content

Commit

Permalink
Fix linters & tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DonJayamanne committed Apr 10, 2024
1 parent c1b74ea commit 9f7d483
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/platform/common/utils/async.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ export class Throttler implements IDisposable {
};

this.queuedPromise = new Promise((resolve) => {
this.activePromise!.then(onComplete, onComplete).then(resolve);
void this.activePromise!.then(onComplete, onComplete).then(resolve);
});
}

Expand Down
6 changes: 2 additions & 4 deletions src/platform/common/utils/symbols.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

/**
* Can be passed into the Delayed to defer using a microtask
Expand Down
4 changes: 2 additions & 2 deletions src/standalone/import-export/importTracker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class ImportTracker implements IExtensionSyncActivationService, IDisposab
private disposables: IDisposable[] = [];
private sentMatches = new Set<string>();
private isTelemetryDisabled: boolean;
constructor(@inject(IDisposableRegistry) disposables: IDisposableRegistry) {
constructor(@inject(IDisposableRegistry) disposables: IDisposableRegistry, delay = 1_000) {
disposables.push(this);
this.isTelemetryDisabled = isTelemetryDisabled();
workspace.onDidOpenNotebookDocument(
Expand All @@ -81,7 +81,7 @@ export class ImportTracker implements IExtensionSyncActivationService, IDisposab
(t) => this.onOpenedOrClosedNotebookDocument(t, 'onOpenCloseOrSave'),
this.disposables
);
const delayer = new Delayer<void>(1_000);
const delayer = new Delayer<void>(delay);
notebooks.onDidChangeNotebookCellExecutionState(
(e) => {
void delayer.trigger(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/standalone/import-export/importTracker.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ import { EmptyEvent } from '../../platform/common/utils/events';
};
}
} as any);
importTracker = new ImportTracker([]);
importTracker = new ImportTracker([], 0);
});
teardown(() => {
sinon.restore();
Expand Down

0 comments on commit 9f7d483

Please sign in to comment.