pipe: add test for onBreak function