Yup. The test partial test ban treaty was signed in 1963 by all the nuclear powers at the time - everything after then, US or otherwise, has been underground, with the exception of, I believe, India, who was not a nuclear power when the treaty was drawn up - india set of a series of undersea tests late in the century.
This was done specifically because they realized they would collectively make the planet uninhabitable if they continued.
France didn't sign, and went on with atmospheric testing until 1974, and the same is true of China (although they didn't start testing until 1964, so they weren't technically part of "all the nuclear powers at the time").
This was done specifically because they realized they would collectively make the planet uninhabitable if they continued.