cm0002@suppo.fi to Programmer Humor@programming.dev · 1 day agoSenior devs...suppo.fiimagemessage-square71fedilinkarrow-up1688
arrow-up1688imageSenior devs...suppo.ficm0002@suppo.fi to Programmer Humor@programming.dev · 1 day agomessage-square71fedilink
minus-squarejjjalljs@ttrpg.networklinkfedilinkarrow-up1·6 hours agoJavascript has mocking with jest: https://jestjs.io/docs/mock-functions There’s an example there of mocking our axios (a common library for network requests, a la python requests) It’s been a long time since I’ve used java, but mockito exists: https://site.mockito.org/javadoc/current/org/mockito/Mockito.html#2 (Usage note for anyone unfamiliar, but despite the name java and JavaScript are radically different languages.)
Javascript has mocking with jest: https://jestjs.io/docs/mock-functions
There’s an example there of mocking our axios (a common library for network requests, a la python requests)
It’s been a long time since I’ve used java, but mockito exists: https://site.mockito.org/javadoc/current/org/mockito/Mockito.html#2
(Usage note for anyone unfamiliar, but despite the name java and JavaScript are radically different languages.)