constcalculator=mockt(Calculator)when(calculator).sum(any(),any()).returns(5,6)when(calculator).sum(2,3).returns(7)calculator.sum(2,3)// returns 7calculator.sum(2,4)// returns 5calculator.sum(2,5)// returns 6 Function call constcalculator=mockt(Calculator)when(calculator).sum(any(),...
I have similar feelings about GraphQL as I do about TypeScript. Sure, people have been building web applications just fine thank you with REST and JavaScript for many years, maybe around 25 at this point which is a lifetime in an engineer’s career. But there comes a point, maybe after...
Once I’ve setup my script and config, I’ll use mix to run my script. I’ll use the following command in a tmux session: MIX_ENV=prod mix run --no-halt I’ve transferred a few ruby and node scripts to Elixir, and the droplet I use for scripts has dropped from ~85% CPU load...
You now have templates for positive and negative scenarios that you can add to a virtual service at any time to simulate successful or unsuccessful Salesforce logins to your application during your testing. In this example, any call to the APIs virtualized by the Transactions will return the des...
A couple weeks ago I think I ended up trying to write a script for around four hours with ChatGPT when probably should have just looked up the relevant documentation myself. It kept going in circles and giving me code that just didn’t do what it said it did, even with me feeding ...