jasmine-jquery icon indicating copy to clipboard operation
jasmine-jquery copied to clipboard

No div#jasmine-fixtures available in "it"-block

Open julkue opened this issue 9 years ago • 0 comments

After loading a fixture I can access the elements correctly inside an "describe"-block. However, when trying to access them inside a "it"-function, jquery will return an empty object.

What is the reason? Is the "it"-function running asynchronously? Example that does not work:

it("should have a length of 1", function(){
  expect($(".x").length).toBe(1);
});
// will cause "expected 0 to be 1"

julkue avatar Dec 31 '15 14:12 julkue