Quick tip

If you are using protractor to test your webapps, then you are inevitably using Promises. Sometimes you might want to create an immediately resolved/rejected promise.

Typically you would write this:

But you can just as easily write the same thing like this:

Much easier!

Related posts

Comments are closed.