fix bug and add test for rejectionRejection
improve code & fix bugs & more tests
test for error factoryReturnedUndefined
add async integration tests