Files
vscode/src/vs/workbench/api/test/browser/extHost.api.impl.test.ts
T
Benjamin Pasero 5455d20ce1 debt - adopt ensureNoDisposablesAreLeakedInTestSuite in more tests (#200116)
* debt - adopt `ensureNoDisposablesAreLeakedInTestSuite` in more tests

* .

* .

* .
2023-12-06 12:09:11 +01:00

25 lines
1.1 KiB
TypeScript

/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as assert from 'assert';
import { URI } from 'vs/base/common/uri';
import { originalFSPath } from 'vs/base/common/resources';
import { isWindows } from 'vs/base/common/platform';
import { ensureNoDisposablesAreLeakedInTestSuite } from 'vs/base/test/common/utils';
suite('ExtHost API', function () {
test('issue #51387: originalFSPath', function () {
if (isWindows) {
assert.strictEqual(originalFSPath(URI.file('C:\\test')).charAt(0), 'C');
assert.strictEqual(originalFSPath(URI.file('c:\\test')).charAt(0), 'c');
assert.strictEqual(originalFSPath(URI.revive(JSON.parse(JSON.stringify(URI.file('C:\\test'))))).charAt(0), 'C');
assert.strictEqual(originalFSPath(URI.revive(JSON.parse(JSON.stringify(URI.file('c:\\test'))))).charAt(0), 'c');
}
});
ensureNoDisposablesAreLeakedInTestSuite();
});