0 votes
in AngularJS Packaging and Testing by
Does Jasmine support asynchronous operations?

1 Answer

0 votes
by

It's possible that the functions you supply to beforeAll, afterAll, beforeEach, and afterEach are asynchronous. Asynchronous functions can be indicated in three ways: by accepting an optional callback parameter, returning a promise, or using the async keyword in environments that support it.

describe("Asynchronous specs", function() {

  var value;

In environments that allow async/await, functions provided to beforeAll, afterAll, beforeEach, and afterEach can be declared async.

...