Edit in JSFiddle

// Code under test
var flag = false;

function testAsync(done) {
    // Wait two seconds, then set the flag to true
    setTimeout(function () {
        flag = true;
    }, 2000);
}

// Specs
describe("Testing async calls", function () {
    
    it("Should be true if the async call has completed", function () {
        expect(flag).toEqual(true);
    });

});