We’ve all walked the burning sands of the ‘Green Test, Broken Production’ mirage. Watching a sea of green is comforting, but it is a hollow victory. The true test comes when the code meets the deep desert of production and withers, leaving us to find that a mock ceased to reflect reality months ago…
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: