I read this over here.
American intelligence has been caught by surprise by every successful test of a nuclear device since the Soviet Union in 1949.
Is this correct?
I doubt it.
The first British test was on Australian soil, using Canadian plutonium, and British scientists who had worked on the Manhattan project, with prime minister Churchill announcing the test 8 months before it happened.
To take another example, according to Wikipedia the Americans also knew when China was developing nuclear weapons,
In June 1959 the two nations [USSR and PRC] formally ended their agreement on military and technology cooperation, and in July 1960 all Soviet assistance with the Chinese nuclear program was abruptly terminated and all Soviet technicians were withdrawn from the program. The American government under John F. Kennedy and Lyndon B. Johnson was concerned about the program and studied ways to sabotage or attack it, perhaps with the aid of Taiwan or the Soviet Union, but Khruschev did not display interest. The first Chinese nuclear test, code-named 596, occurred on 16 October 1964.
At least in the case of South Africa, Not only that the US intelligence knew of preparations for a nuclear test. The US, together with other world powers were able to prevent if from happening.
According to Wikipedia:
Atomic Energy Commission officials say that a "cold test" (a test without uranium-235) was planned for August 1977. An Armscor official who was not involved at the time said that the test would have been a fully instrumented underground test, with a dummy core. Its major purpose was to test the logistical plans for an actual detonation.
How that test was cancelled has been well publicised. Soviet intelligence detected test preparations and in early August alerted the United States; U.S. intelligence confirmed the existence of the test site with an overflight of a Lockheed SR-71 spy plane. On 28 August, the Washington Post quoted a U.S. official: "I'd say we were 99 percent certain that the construction was preparation for an atomic test."
The Soviet and Western governments were convinced that South Africa was preparing for a full-scale nuclear test. During the next two weeks in August, the Western nations pressed South Africa not to test. The French foreign minister warned on 22 August of "grave consequences" for French-South African relations. Although he did not elaborate, his statement implied that France was willing to cancel its contract to provide South Africa with the Koeberg nuclear power reactors.
Wikipedia cites its sources for this as:
The passage in Wikipedia is a direct quote from the second source (page 41).