That's the point to use a mock document, even in a real browser. We don't want to test the document.cookie component here, we want to test the tm.cookie component. If we depend on the real document.cookie, we don't have control on its data before and after a unit test.