minus-squareAijan@programming.devOPtoProgramming@programming.dev•Mocks are the Little-Death: Escaping the Mirage of Green Testslinkfedilinkarrow-up2·11 days agoYou can handle complex branching using standard JavaScript. Since every pipeline is just a function returning data, you can use if/else or map to return different sub-pipelines and commands from within your logic functions. Here’s an example: const processUsersFlow = () => effectPipe( fetchAllUsers, (users) => { const tasks = users.map(user => { if (user.isAdmin) return syncAdminPermissions(user); // Sub-pipeline if (user.isGuest) return cleanupGuestAccount(user); // Sub-pipeline return notifyUser(user); // Simple Command }); return Parallel(tasks); } )(); linkfedilink
Aijan@programming.dev to Programming@programming.dev · edit-211 days agoMocks are the Little-Death: Escaping the Mirage of Green Testsplus-squarelackofimagination.orgexternal-linkmessage-square7fedilinkarrow-up125arrow-down10
arrow-up125arrow-down1external-linkMocks are the Little-Death: Escaping the Mirage of Green Testsplus-squarelackofimagination.orgAijan@programming.dev to Programming@programming.dev · edit-211 days agomessage-square7fedilink
Aijan@programming.dev to Programming@programming.dev · 2 months agoBeyond the README: Enforcing Application Guardrails at Runtimeplus-squarelackofimagination.orgexternal-linkmessage-square1fedilinkarrow-up19arrow-down11
arrow-up18arrow-down1external-linkBeyond the README: Enforcing Application Guardrails at Runtimeplus-squarelackofimagination.orgAijan@programming.dev to Programming@programming.dev · 2 months agomessage-square1fedilink
Aijan@programming.dev to Programming@programming.dev · 3 months agoTime-Travel Debugging: Replaying Production Bugs Locallyplus-squarelackofimagination.orgexternal-linkmessage-square0fedilinkarrow-up16arrow-down10
arrow-up16arrow-down1external-linkTime-Travel Debugging: Replaying Production Bugs Locallyplus-squarelackofimagination.orgAijan@programming.dev to Programming@programming.dev · 3 months agomessage-square0fedilink
Aijan@programming.dev to Programming@programming.dev · 2 years agoSelf-documenting Codeplus-squarelackofimagination.orgexternal-linkmessage-square1fedilinkarrow-up10arrow-down10
arrow-up10arrow-down1external-linkSelf-documenting Codeplus-squarelackofimagination.orgAijan@programming.dev to Programming@programming.dev · 2 years agomessage-square1fedilink
Aijan@programming.dev to Programming@programming.dev · 2 years agoAvoiding if-else Hell: The Functional Styleplus-squarelackofimagination.orgexternal-linkmessage-square0fedilinkarrow-up10arrow-down10
arrow-up10arrow-down1external-linkAvoiding if-else Hell: The Functional Styleplus-squarelackofimagination.orgAijan@programming.dev to Programming@programming.dev · 2 years agomessage-square0fedilink
You can handle complex branching using standard JavaScript. Since every pipeline is just a function returning data, you can use if/else or map to return different sub-pipelines and commands from within your logic functions. Here’s an example: