test: add test for pipeline

also use mock promise implementation