The U.S. Capitol is seen on December 20, 2024 in Washington, DC.

The Republican-controlled U.S. House of Representatives passed legislation on Friday that would avert a midnight government shutdown, defying U.S. president-elect Donald Trump's demand to also greenlight trillions of dollars in new debt.