Skip to content

Commit 6decd32

Browse files
committed
Better plugin arg assertions
1 parent 2d891a4 commit 6decd32

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

test/integration-tests/tasks/SwiftPluginTaskProvider.test.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,6 @@ suite("SwiftPluginTaskProvider Test Suite", function () {
245245
});
246246

247247
test("provides", () => {
248-
expect(task?.detail).to.equal("swift package command_plugin");
249248
expect(task?.execution.args).to.deep.equal(
250249
folderContext.toolchain.buildFlags.withAdditionalFlags([
251250
"package",
@@ -264,15 +263,22 @@ suite("SwiftPluginTaskProvider Test Suite", function () {
264263
});
265264

266265
suite("includes command plugin provided by tasks.json", () => {
267-
let task: vscode.Task | undefined;
266+
let task: SwiftTask | undefined;
268267

269268
setup(async () => {
270269
const tasks = await vscode.tasks.fetchTasks({ type: "swift-plugin" });
271-
task = tasks.find(t => t.name === "swift: command-plugin from tasks.json");
270+
task = tasks.find(
271+
t => t.name === "swift: command-plugin from tasks.json"
272+
) as SwiftTask;
272273
});
273274

274275
test("provides", () => {
275-
expect(task?.detail).to.equal("swift package command_plugin --foo");
276+
expect(task?.execution.args).to.deep.equal([
277+
"package",
278+
"--disable-sandbox",
279+
"command_plugin",
280+
"--foo",
281+
]);
276282
});
277283

278284
test("executes", async () => {

0 commit comments

Comments
 (0)