Enhance mocker
- spin off into own npm module
- have a
mock
function that takes a module and returns a mocked version of it - make
restore
function unneeded by only returning the mocked object and not other parts of it - have a
mock
function that mocks a module without returning it and affecting all instances of it - may needrestore
for this like current behaviour, but ideally not - reduce object bloat with the
copy_for_mock
fields, don't have them in the object. These are only needed ifrestore
is needed. - change the
verifyCalled
function to not need aresetVerifier
call - introduce spying