I missed this the first time around. Setting anything to the empty object works, but that reference still evaluates to false. That is why the ok assertion fails. I needed to do a more proper check for strictly undefined:
ok("ns" in window, "namespace is bad");
per the top answer here.