function
test.spyOn
obj: T,
property: K,
accessType: 'get'
Create a spy on a property's getter. The spy calls the original getter until you give it another implementation.
spyOn(navigator, "userAgent", "get").mockReturnValue("test");Referenced types
type Mock<T extends (...args: any[]) => any> = JestMock.Mock<T>