More details: the error is happening because the object was created with default properties, all of which have a value of False. By doing it this way:
Object.defineProperty(window, 'sessionStorage', { value: mock,configurable:true,enumerable:true,writable:true });
The problem is solved. This was actually suggested in the comments to that issue. Sometimes it pays to read. This was also highlighted in this blog post: