In one minecraft world that I unfortunately lost I had a bunch of cats and a couple foxes in my underground base, they were all in a separated room which I thought was lit enough and no monsters had spawned there since I set up my base in that cave.
Until I died one time and when I respawned there was a creeper inside the room and blocking the door. luckily I ran past and opened the door fast enough that it didn't explode. IDK how it spawned there or how I managed to avoid losing all my pets and room, but I put torches on nearly every block on the wall after that. XD