Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jest spyon

// jest.spyOn(object, methodName)
const spy = jest.spyOn(video, 'play');

// jest.spyOn(object, methodName, accessType?)
const spy = jest.spyOn(video, 'play', 'get'); // we pass 'get'
 
PREVIOUS NEXT
Tagged: #jest #spyon
ADD COMMENT
Topic
Name
6+5 =