President-elect Donald Trump has pledged a $1 trillion infrastructure spending program to help jump-start an economy that he said during the campaign was in terrible shape.

Speaking on Capitol Hill Thursday, Federal Reserve Board Chair Janet Yellen warned lawmakers that as they consider such spending, they should keep an eye on the national debt. Yellen also said that while the economy needed a big boost with fiscal stimulus after the financial crisis, that's not the case now.

"The economy is operating relatively close to full employment at this point," she said, "so in contrast to where the economy was after the financial crisis when a large demand boost was needed to lower unemployment, we're no longer in that state."

Yellen cautioned lawmakers that if they spend a lot on infrastructure and run up the debt, and then down the road the economy gets into trouble, "there is not a lot of fiscal space should a shock to the economy occur, an adverse shock, that should require fiscal stimulus."

In other words, lawmakers should consider keeping their powder dry so they have more options whenever the next economic downturn comes along.

Trump was harshly critical of Yellen during his campaign. But testifying before the Joint Economic Committee, Yellen said she is not going to quit just because Trump won the election. Rep. Carolyn Maloney, D-N.Y., asked Yellen, "Can you envision any circumstances where you would not serve out your term as chair of the Federal Reserve?" "No, I cannot," answered Yellen, "It is fully my intention to serve out that term." Yellen's appointment goes through January 2018.

Another target of Trump's during the campaign came up at the hearing: the Dodd-Frank Wall Street Reform and Consumer Protection Act. Rep. Pat Tiberi, R-Ohio, cited Trump's criticism that the Dodd-Frank banking rules were stifling lending and stunting the economy. But Yellen gave her support to Dodd-Frank, saying:

"We lived through a devastating financial crisis, and a high priority for all Americans should be that we want to see put in place safeguards through supervision and regulation that result in a safer and sounder financial system, and I think we have been doing that and our financial system as a consequence is safer and sounder and many of the appropriate reforms are embodied in Dodd-Frank."

Yellen added, "We wouldn't want to go back to the mortgage lending standards that led to the financial crisis."

She also said she thought banks were actually willing to lend to small businesses, but that sales haven't been growing sufficiently fast to justify borrowing, suggesting the demand for loans was the real problem.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.