Jest mock window typescript. callFake((key) => key in .