Pedestrians walk past a Sephora and Footlocker store, in New YorkRetail Sales, New York, USA - 16 May 2018

Tariffs — and the threat of even more — didn’t stop consumers from opening their wallets last month.

According to the Commerce Department, retail sales grew 0.4 percent from May and when volatile categories such as fuel and motor vehicles were stripped out, the gains were even higher at 0.7 percent.

The increases were broad-based with consumers spending more on eating out and other activities. Apparel and accessories store sales, in particular, rose 0.5 percent. (Although when compared with a year earlier, June sales marked a 0.9 percent drop for apparel and accessories stores. And the struggling department store sector remained an outlier, seeing June sales slip 1.1 percent from May and 5.2 percent from a year earlier).

The month-to-month gains were all the more impressive considering they came amid the U.S.-China trade war. The U.S. already increased levies on $200 billion worth of goods from China, including handbags, and was preparing to unleash more on a wide-ranging raft of consumer-facing goods, although it has since agreed to indefinitely postpone more duties.

The sales results also fuel hopes that the economy grew at a decent pace in the second quarter since consumer spending accounts for over three-quarters of economic growth.

“These are impressive results showing that the consumer remains engaged and that consumer spending gave a boost to the economy in the second quarter,” said Jack Kleinhenz, chief economist at the National Retail Federation.

“The numbers are consistent with elevated consumer sentiment, healthy household balance sheets, low inflation and wage and job gains,” he said. “The year-over-year growth is particularly significant given that it comes on top of strong gains at this time last year.”

Stephen Stanley, chief economist at Amherst Pierpont, was in agreement, noting that the retail sales gauge excluding volatile items has risen at almost a 9 percent annualized clip over the past four months after a difficult start to the year.

As a result, he will likely upwardly revise his forecast for second-quarter GDP to 2.7 percent from 2.5 percent. The majority of forecasts are in the 2 percent range.

Stanley said that for all of the caution in the business community and the prevailing gloom in the financial markets, “The consumer sees nothing but sunshine and flowers, which in my view is what happens when you have an unemployment rate below 4 percent and an acceleration in wage gains.”

Not everyone was optimistic, though. Andrew Hunter, senior U.S. economist at Capital Economics, is penciling in second-quarter growth of just over 1.5 percent despite the strength in consumption, as he believes it will be dragged down by “unusually weak” investment.

“Moreover, given the recent deterioration in the survey evidence, we expect a further slowdown in economic growth over the second half of the year. That should prompt the Fed to cut rates by a cumulative 75 basis points by early next year,” he added.

The NRF also warned that while the prospect of tariff increases has subsided for the moment, trade uncertainties continue to weigh on the long-term outlook.