test with onEnd function
more test coverage
provide onEnd cb, and pass all the tests
1.1.0