The first legislative test of the Iran-contra hearings occurred last week. A mean little right-wing victory showed conclusively that fear is alive and well in the Democratic House of Representatives.

An amendment to the State Department appropriations bill restricting travel to Nicaragua passed by a vote of 213 to 201. The sponsor was Robert S. Walker (R-Pa.), indefatigable right-wing activist, who sought to forbid passports to Americans who go to Nicaragua "to provide direct help to the communists in Central America."

Even the most ardent contra supporters could see that forbidding Americans to travel to a country with whom we have diplomatic relations would look pretty silly at a time when we are officially clamoring for travel rights for Soviet citizens. So an amendment that made it palatable to the craven was introduced by Rep. Robert C. Smith (R-N.H.). He forbids Americans to go to Nicaragua "for the purpose of helping military operations of the Sandinista government."

His amendment, Walker insists, is not aimed at the hundreds of Americans who go annually to pick coffee, teach reading and writing or administer health aid.

His amendment has no teeth. "Like the Boland Amendment, it has no penalties," he says proudly.

Its real target, of course, is in the grave: Benjamin Linder, the 27-year-old civil engineer from Portland, Ore., who was killed by the contras; his father and several pathologists say he was shot in the head at point-blank range. Linder seems to have been a particularly dedicated and beguiling kind of humanitarian and his death caused a fury of mortification on the right.

When Linder's mother and father appeared before a congressional committee seeking to look into the circumstances, Rep. Connie Mack III (R-Fla.) told them he couldn't understand "how you can use the grief I know you feel to politicize this situation . . . . I don't want to be tough on you, but I really believe you're asking for it."

Said Linder's mother, "That was the most cruel thing you could have said."

Smith says sponsors did not have Linder in mind, just those who might follow in his footsteps.

"Under my amendment, Linder would not go back. He couldn't -- he's dead. It's against the law to help the contras, it should be against the law to help the Sandinistas. He may have gone down there to build a dam, but he was armed with a Soviet-made weapon. Do you need a Soviet weapon to build a dam?"

Walker says, "Linder was armed. He had Sandinista military uniforms in his locker in the village. He became a combatant on the side of the Sandinistas."

At the select committee hearings, the defiant Americans who, under the auspices of such organizations as Witness for Peace, TecNICA and Neighbor to Neighbor give a hand to the war's victims, provide an undertone of right-wing exasperation. Sen. James A. McClure (R-Idaho) growled that he and his fellow members should be investigating those groups.

Among House Democrats who voted with Walker were two members of the Wisconsin delegation, Les Aspin and David R. Obey. Obey doesn't think the bill will survive. Obey votes against contra aid; Aspin has voted for it, but has vowed to liberals who helped him retain his chairmanship of the Armed Services Committee that he will never vote for it again. Colleagues ascribe his aye for Walker to perversity. Most members would die for a seat on the select committee. Aspin has been absent from his for all but two sessions.

The Walker amendment is a matter of passionate interest in Wisconsin, which has regarded Nicaragua as "a sister state" for 20 years. The Wisconsin Coordinating Council on Nicaragua represents 70 organizations that send a steady stream of labor leaders, lawyers, doctors, teachers and agricultural experts to make life livable for Nicaraguans.

Rep. Les AuCoin (D-Ore.), Linder's congressman, calls the Walker amendment "an atrocity" and says that Democrats had no warning that it was coming to the floor. "Members know it's crazy but they are terrified by the possibility of 30-second television spots from right-wing guerrillas."

House Majority Leader Thomas S. Foley (D-Wash.) has told colleagues that if the bill stays in the State Department appropriations bill he will vote against the whole appropriation.

Administration advocates took the vote as an indicator that they may, after all, salvage contra aid. Coming simultaneously with the House retreat on two peace amendments, it suggests that a Democratic Congress may be as easily whipped into line by a weakened president as by a strong one.