Some jasmine tests using promises. Hopefully finding out how to make it nice and useable.