ok, I've did some test with this, and this doesn't work like you think it works.

* `Object.getOwnPropertyDescriptor(document, 'hidden')` always returns `undefined`
* therefore, you get `undefined` in the first setup call, so in the second setup call, you try to get it again, and then you get your mocked one

What works very well is:
* call defineProperty in `suiteSetup`
* `delete document.hidden` in suiteTeardown

I tried this in Firefox' devtools: my `get` descriptor was always returning `true`, and when I called `delete document.hidden`, it was back to `false` as expected (and not `undefined` for example).

This works because the "hidden" property is inherited. `Object.getOwnPropertyDescriptor(document.__proto__.__proto__, 'hidden')` works, for example, but I think this looks bad ;) You could also try to walk up the prototype chain until you find a descriptor, but I think this isn't work it, and just defining the mock property on `document` and deleting it after the suite is simpler and works fine.

I also tried simply setting `document.hidden = true` instead of using `defineProperty` but that doesn't work because then it uses the descriptor in the inherited prototype.

Can you change this to implement my idea instead ?