Failing test: Revert "Add isDefault to TaskGroup API (#128596)"

This reverts commit 48975dc080.
This commit is contained in:
Alex Ross
2021-07-16 10:16:16 +02:00
parent 5f09d73d6f
commit cbde02b886
10 changed files with 25 additions and 94 deletions

View File

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import * as assert from 'assert';
import { window, tasks, Disposable, TaskDefinition, Task, Task2, EventEmitter, CustomExecution, Pseudoterminal, TaskScope, commands, env, UIKind, ShellExecution, TaskExecution, Terminal, Event, workspace, ConfigurationTarget, TaskProcessStartEvent } from 'vscode';
import { window, tasks, Disposable, TaskDefinition, Task, EventEmitter, CustomExecution, Pseudoterminal, TaskScope, commands, env, UIKind, ShellExecution, TaskExecution, Terminal, Event, workspace, ConfigurationTarget, TaskProcessStartEvent } from 'vscode';
import { assertNoRpc } from '../utils';
// Disable tasks tests:
@@ -331,38 +331,6 @@ import { assertNoRpc } from '../utils';
}
});
});
test('A task can be fetched with default task group information', () => {
return new Promise<void>(async (resolve, reject) => {
// Add default to tasks.json since this is not possible using an API yet.
const tasksConfig = workspace.getConfiguration('tasks');
await tasksConfig.update('version', '2.0.0', ConfigurationTarget.Workspace);
await tasksConfig.update('tasks', [
{
label: 'Run this task',
type: 'shell',
command: 'sleep 1',
problemMatcher: [],
group: {
kind: 'build',
isDefault: 'true'
}
}
], ConfigurationTarget.Workspace);
const task = <Task2[]>(await tasks.fetchTasks());
if (task && task.length > 0) {
const grp = task[0].group;
assert.strictEqual(grp?.isDefault, true);
resolve();
} else {
reject('fetched task can\'t be undefined');
}
// Reset tasks.json
await tasksConfig.update('tasks', []);
});
});
});
});
});