it("should resolve the blocksDone promise immediately if no includes are found on the page", function(){ spyOn(EsbPage, 'get_parsed_esb_includes').and.returnValue([]); EsbPage.display(); var promise = EsbPage.blocksDone(); promise.then(function(value){ expect(value).toEqual(true); done(); }); });
it ("should parse the includes on the page and render them to the dom", function(done){ loadFixtures('include.html'); EsbPage.parse(); EsbPage.display(); EsbPage.blocksDone().then(function(){ expect($('#jasmine-fixtures h1:contains("Hello Includes!")').length).toEqual(1); done(); }, function(err){ console.log(err); }); });