     end
 
     assert_raise FunctionClauseError, fn ->
-      Task.Supervisor.start_child(config[:supervisor], __MODULE__, "wait_and_send", [
-        self(),
-        :done
-      ])
+      args = [self(), :done]
+      Task.Supervisor.start_child(config[:supervisor], __MODULE__, "wait_and_send", args)
     end
   end
 
   test "terminate_child/2", config do
+    args = [self(), :done]
+
     {:ok, pid} =
-      Task.Supervisor.start_child(config[:supervisor], __MODULE__, :wait_and_send, [self(), :done])
+      Task.Supervisor.start_child(config[:supervisor], __MODULE__, :wait_and_send, args)
 
     assert Task.Supervisor.children(config[:supervisor]) == [pid]
     assert Task.Supervisor.terminate_child(config[:supervisor], pid) == :ok

    end

    test "shuts down unused tasks", %{supervisor: supervisor} do
      assert supervisor
             |> Task.Supervisor.async_stream_nolink(
                  [0, :infinity, :infinity, :infinity],
                  &sleep/1,
                  @opts
                )
             |> Enum.take(1) == [ok: 0]

      assert Process.info(self(), :links) == {:links, [supervisor]}
    end

    test "shuts down unused tasks without leaking messages", %{supervisor: supervisor} do
      assert supervisor
             |> Task.Supervisor.async_stream_nolink(
                  [0, :infinity, :infinity, :infinity],
                  &sleep/1,
                  @opts
                )
             |> Enum.take(1) == [ok: 0]

      refute_received _

    parent = self()
    fun = fn -> wait_and_send(parent, :done) end
    task = Task.Supervisor.async(config[:supervisor], fun)
    assert Task.Supervisor.children(config[:supervisor]) == [task.pid]

    # Assert the struct
