Remove form input fails when using remove()'s optional selector

Remove form input fails when using remove()'s optional selector

When trying to write code to remove an input element from a form, I found some weird behavior. I would expect both commands below to have the same effect, removing an input element from the form (test-1). Is this expected behavior or a bug?

What doesn't work:
  1. $("#test-1").remove('[name=testInput]');

What does work:
  1.  $("#test-1").find('[name=testInput]').remove();