mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
debt - properly await runWithFakedTimers (#192887)
* debt - properly await `runWithFakedTimers`
* UI Overlap With `window.nativeTabs: false`, `window.commandCenter: true`, and Tab per Project (fix #192801)
* Revert "UI Overlap With `window.nativeTabs: false`, `window.commandCenter: true`, and Tab per Project (fix #192801)"
This reverts commit 31a191b8f0.
This commit is contained in:
@@ -55,7 +55,7 @@ suite('ResourceWorkingCopy', function () {
|
||||
});
|
||||
|
||||
test('orphaned tracking', async () => {
|
||||
runWithFakedTimers({}, async () => {
|
||||
return runWithFakedTimers({}, async () => {
|
||||
assert.strictEqual(workingCopy.isOrphaned(), false);
|
||||
|
||||
let onDidChangeOrphanedPromise = Event.toPromise(workingCopy.onDidChangeOrphaned);
|
||||
|
||||
@@ -234,7 +234,7 @@ suite('StoredFileWorkingCopy', function () {
|
||||
});
|
||||
|
||||
test('orphaned tracking', async () => {
|
||||
runWithFakedTimers({}, async () => {
|
||||
return runWithFakedTimers({}, async () => {
|
||||
assert.strictEqual(workingCopy.hasState(StoredFileWorkingCopyState.ORPHAN), false);
|
||||
|
||||
let onDidChangeOrphanedPromise = Event.toPromise(workingCopy.onDidChangeOrphaned);
|
||||
@@ -411,7 +411,7 @@ suite('StoredFileWorkingCopy', function () {
|
||||
});
|
||||
|
||||
test('resolve (with backup, preserves metadata and orphaned state)', async () => {
|
||||
runWithFakedTimers({}, async () => {
|
||||
return runWithFakedTimers({}, async () => {
|
||||
await workingCopy.resolve({ contents: bufferToStream(VSBuffer.fromString('hello backup')) });
|
||||
|
||||
const orphanedPromise = Event.toPromise(workingCopy.onDidChangeOrphaned);
|
||||
@@ -440,7 +440,7 @@ suite('StoredFileWorkingCopy', function () {
|
||||
});
|
||||
|
||||
test('resolve (updates orphaned state accordingly)', async () => {
|
||||
runWithFakedTimers({}, async () => {
|
||||
return runWithFakedTimers({}, async () => {
|
||||
await workingCopy.resolve();
|
||||
|
||||
const orphanedPromise = Event.toPromise(workingCopy.onDidChangeOrphaned);
|
||||
@@ -694,7 +694,7 @@ suite('StoredFileWorkingCopy', function () {
|
||||
});
|
||||
|
||||
test('save (no errors) - save clears orphaned', async () => {
|
||||
runWithFakedTimers({}, async () => {
|
||||
return runWithFakedTimers({}, async () => {
|
||||
let savedCounter = 0;
|
||||
disposables.add(workingCopy.onDidSave(e => {
|
||||
savedCounter++;
|
||||
|
||||
Reference in New Issue
Block a user