Skip to content

Commit d4de5ce

Browse files
authored
test: adopt ensureNoDisposablesAreLeakedInTestSuite (microsoft#236766)
* test: adopt `ensureNoDisposablesAreLeakedInTestSuite` * test: adopt `ensureNoDisposablesAreLeakedInTestSuite`
1 parent 68252d3 commit d4de5ce

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

eslint.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@ export default tseslint.config(
229229
'src/vs/workbench/api/test/node/extHostTunnelService.test.ts',
230230
'src/vs/workbench/contrib/bulkEdit/test/browser/bulkCellEdits.test.ts',
231231
'src/vs/workbench/contrib/chat/test/common/chatWordCounter.test.ts',
232-
'src/vs/workbench/contrib/editSessions/test/browser/editSessions.test.ts',
233232
'src/vs/workbench/contrib/extensions/test/common/extensionQuery.test.ts',
234233
'src/vs/workbench/contrib/notebook/test/browser/notebookExecutionService.test.ts',
235234
'src/vs/workbench/contrib/notebook/test/browser/notebookExecutionStateService.test.ts',

src/vs/workbench/contrib/editSessions/test/browser/editSessions.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,13 @@ import { TestStorageService } from '../../../../test/common/workbenchTestService
5050
import { IUriIdentityService } from '../../../../../platform/uriIdentity/common/uriIdentity.js';
5151
import { UriIdentityService } from '../../../../../platform/uriIdentity/common/uriIdentityService.js';
5252
import { IWorkspaceIdentityService, WorkspaceIdentityService } from '../../../../services/workspaces/common/workspaceIdentityService.js';
53+
import { ensureNoDisposablesAreLeakedInTestSuite } from '../../../../../base/test/common/utils.js';
5354

5455
const folderName = 'test-folder';
5556
const folderUri = URI.file(`/${folderName}`);
5657

5758
suite('Edit session sync', () => {
59+
5860
let instantiationService: TestInstantiationService;
5961
let editSessionsContribution: EditSessionsContribution;
6062
let fileService: FileService;
@@ -63,6 +65,7 @@ suite('Edit session sync', () => {
6365
const disposables = new DisposableStore();
6466

6567
suiteSetup(() => {
68+
6669
sandbox = sinon.createSandbox();
6770

6871
instantiationService = new TestInstantiationService();
@@ -172,6 +175,10 @@ suite('Edit session sync', () => {
172175
disposables.clear();
173176
});
174177

178+
suiteTeardown(() => {
179+
disposables.dispose();
180+
});
181+
175182
test('Can apply edit session', async function () {
176183
const fileUri = joinPath(folderUri, 'dir1', 'README.md');
177184
const fileContents = '# readme';
@@ -218,4 +225,6 @@ suite('Edit session sync', () => {
218225
// Verify that we did not attempt to write the edit session
219226
assert.equal(writeStub.called, false);
220227
});
228+
229+
ensureNoDisposablesAreLeakedInTestSuite();
221230
});

0 commit comments

Comments
 (0)