in case we replace the transaction function, we return an object that also mocks the objectStore

we do this in cases where the use of `transaction.oncomplete` in unavoidable