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 506c331 commit b22d066
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 @@ -68,7 +68,7 @@ export class ImportTracker implements IExtensionSyncActivationService, IDisposab
private get isTelemetryDisabled() {
return isTelemetryDisabled();
}
constructor(@inject(IDisposableRegistry) disposables: IDisposableRegistry) {
constructor(@inject(IDisposableRegistry) disposables: IDisposableRegistry, delay = 1_000) {
disposables.push(this);
workspace.onDidOpenNotebookDocument(
(t) => this.onOpenedOrClosedNotebookDocument(t, 'onOpenCloseOrSave'),
Expand All @@ -82,7 +82,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 @@ -148,7 +148,7 @@ import { mockedVSCodeNamespaces } from '../../test/vscode-mock';
};
}
} as any);
importTracker = new ImportTracker(disposables);
importTracker = new ImportTracker(disposables, 0);
});
teardown(() => {
sinon.restore();
Expand Down

0 comments on commit b22d066

Please sign in to comment.