{"action":"created","issue":{"url":"https://api.github.com/repos/fschwiet/DreamNJasmine/issues/21","labels_url":"https://api.github.com/repos/fschwiet/DreamNJasmine/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/fschwiet/DreamNJasmine/issues/21/comments","events_url":"https://api.github.com/repos/fschwiet/DreamNJasmine/issues/21/events","html_url":"https://github.com/fschwiet/DreamNJasmine/issues/21","id":53842329,"number":21,"title":"Issue with Njsamine is calling the outerscope before beforeAll func","user":{"login":"wangvnn","id":3665482,"avatar_url":"https://avatars.githubusercontent.com/u/3665482?v=3","gravatar_id":"","url":"https://api.github.com/users/wangvnn","html_url":"https://github.com/wangvnn","followers_url":"https://api.github.com/users/wangvnn/followers","following_url":"https://api.github.com/users/wangvnn/following{/other_user}","gists_url":"https://api.github.com/users/wangvnn/gists{/gist_id}","starred_url":"https://api.github.com/users/wangvnn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangvnn/subscriptions","organizations_url":"https://api.github.com/users/wangvnn/orgs","repos_url":"https://api.github.com/users/wangvnn/repos","events_url":"https://api.github.com/users/wangvnn/events{/privacy}","received_events_url":"https://api.github.com/users/wangvnn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-09T07:51:05Z","updated_at":"2015-01-09T17:50:32Z","closed_at":null,"body":"According to this:\r\n\"The outer scope of each specification is ran once to discover what tests are defined, and then again once again for each contained test. Test code must not block if its directly within a describe(), given, or when() expression. Such code will cause test discovery to stall.\r\n\r\nUnlike Jasmine or RSpec, in NJasmine each level of scope for a test runs for every test. If you really want some setup code to run once for multiple tests, use beforeAll(). The expression passed to beforeAll() is invoked once then any value it returns is passed to the following tests.\"\r\n\r\nThe outer scope (example given, when) can be called before 'beforeAll' function which can cause issue if the given's code depends on beforeAll code. I understand that I can turn on the flag in beforeAll and check it in given, when code... but this is not very friendly.\r\n\r\nAny one has any suggestion?"},"comment":{"url":"https://api.github.com/repos/fschwiet/DreamNJasmine/issues/comments/69370828","html_url":"https://github.com/fschwiet/DreamNJasmine/issues/21#issuecomment-69370828","issue_url":"https://api.github.com/repos/fschwiet/DreamNJasmine/issues/21","id":69370828,"user":{"login":"fschwiet","id":222328,"avatar_url":"https://avatars.githubusercontent.com/u/222328?v=3","gravatar_id":"","url":"https://api.github.com/users/fschwiet","html_url":"https://github.com/fschwiet","followers_url":"https://api.github.com/users/fschwiet/followers","following_url":"https://api.github.com/users/fschwiet/following{/other_user}","gists_url":"https://api.github.com/users/fschwiet/gists{/gist_id}","starred_url":"https://api.github.com/users/fschwiet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fschwiet/subscriptions","organizations_url":"https://api.github.com/users/fschwiet/orgs","repos_url":"https://api.github.com/users/fschwiet/repos","events_url":"https://api.github.com/users/fschwiet/events{/privacy}","received_events_url":"https://api.github.com/users/fschwiet/received_events","type":"User","site_admin":false},"created_at":"2015-01-09T17:50:32Z","updated_at":"2015-01-09T17:50:32Z","body":"An example might help, but generally whatever code that depends on a beforeAll() result should be wrapped in before(), after*(), then() or something like that."}}