Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.

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

Open
julkue opened this issue Dec 31, 2015 · 0 comments
Open

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

julkue opened this issue Dec 31, 2015 · 0 comments

Comments

@julkue
Copy link

julkue commented Dec 31, 2015

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"
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant