How do we know that our nukes still work?

Basically (and it’s an oversimplification, more sites are involved), Los Alamos designs the weapons and deals with the nuclear part and Sandia maintains the stockpile and non-nuclear parts. Lots and lots of computer simulations are still used. A lot of the big fancy experimental equipment at the labs is used for stockpile stewardship as well as other investigations.

Sorry, but no. Back in the day the US conducted live-fire nuclear detonation tests using every possible deliver system: missiles from silos, sub-launched missiles, MIRVs, air-to-air missiles, air-to-ground missiles and bombs, space detonations etc. and in many, many different scenarios. The nuclear deterrent was recognized as the new ‘capital ship’ of modern warfare and nothing was going to be left to chance. Not then, and not now.

This is all true, and this plus component and subscale testing serves to give confidence in functional simulations and reliability models, but we have not performed end-to-end functional tests since the 'Sixties, and have not performed underground testing of nuclear weapons at any yield since the late 'Eighties. Full-up testing is performed on the delivery vehicle (i.e. the ICBM booster and post-boost vehicle) multiple times a year as well as the operational AS program on delivery system components. The continued reliability and accurate assessment of aging effects is a significant concern for the nuclear segment of the system, especially since we can no longer functionally test this segment; this is compounded by the requirement to upgrade the existing system and develop a new warhead system (the now defunded Reliable Replacement Warhead). The weapon testing and physical simulation facilities at Sandia and Lawrence Livermore National Labs–most notably, the National Ignition Facility at LLNL–are intened to replicate materials aging, dynamics, high energy radiation, and other non-terrestial or acceleated conditions.

Stranger

We can test the weapons in pieces.

Say take a random bomb out of the stockpile, replace the nuclear material with sensors and set it off to make sure that you are getting the implosion that you need. Then take a look at the nuclear material, and check its integrity and purity. If the implosion device worked, and the material is good to go, and you have previously demonstrated that the two together produce a big boom, that’s probably good enough to scare off the Russians.

Exactly. It doesn’t have to actually work, because the day where we want it to work, we’re probably all going to be a cloud of ash soon so what difference does it make?

It doesn’t matter: if you order a strike and it doesn’t go off, then one says that was deliberate and claims credit for one’s magnificent forbearance.