{"action":"created","issue":{"url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/2495","labels_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/2495/labels{/name}","comments_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/2495/comments","events_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/2495/events","html_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/2495","id":57886102,"number":2495,"title":"Upgrade to Jasmine 2.2.0","user":{"login":"kring","id":924374,"avatar_url":"https://avatars.githubusercontent.com/u/924374?v=3","gravatar_id":"","url":"https://api.github.com/users/kring","html_url":"https://github.com/kring","followers_url":"https://api.github.com/users/kring/followers","following_url":"https://api.github.com/users/kring/following{/other_user}","gists_url":"https://api.github.com/users/kring/gists{/gist_id}","starred_url":"https://api.github.com/users/kring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kring/subscriptions","organizations_url":"https://api.github.com/users/kring/orgs","repos_url":"https://api.github.com/users/kring/repos","events_url":"https://api.github.com/users/kring/events{/privacy}","received_events_url":"https://api.github.com/users/kring/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":20,"created_at":"2015-02-17T05:47:40Z","updated_at":"2015-02-18T01:32:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/2495","html_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/2495","diff_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/2495.diff","patch_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/2495.patch"},"body":"\"Guaranteed to be the most fun you'll have reviewing a pull request all year!\"\r\n\r\nLots of changes here:\r\n* Remove `waitsFor`, `waits`, and `runs` from the list of globals in every spec file.  In about 200 of the 347 files changed, this is the only change.\r\n* Use promises for async tests rather than `waitsFor` and `runs`, since Jasmine no longer supports those functions and promises are way better.\r\n* Replace `toNotBe` and `toNotEqual` with `not.toBe` and `not.toEqual` because Jasmine no longer supports the former.\r\n* Change every test that used spies, because the syntax changed a bit.\r\n* A few small changes that were necessary because Jasmine's `toEqual` matcher is a lot pickier than it was before.  Not only must the properties of the objects be the same for the objects to be considered equal, but their constructors must be the same as well.\r\n* In a few places, we were using `it` calls to set up preconditions for specs that followed for some reason.  This created order-dependence and made the dependent specs impossible to run by themselves.  I changed them to use `beforeAll` instead.\r\n* Completely reimplement our custom features in the spec runner page, since merging was impossible.\r\n\r\nOn the last one, what I believe to be all the important functionality is working, such as coverage reporting, categories, and running against the built version, but I haven't done an amazing job of it.  The UI is a little clunkier than before.  I'd like to do more work on this but as a separate pull request so I'm not constantly chasing changes in Cesium's tests in the meantime.  If there's something you can't live with/without, let me know.\r\n\r\nFAQ:\r\n> Do I really have to review this?\r\n\r\nNo, but you should probably at least try running the specs in this branch to see how mad you'll be when it gets merged.\r\n\r\n> Are we really sticking with Jasmine instead of using something else?\r\n\r\nMaybe.  I started on this pull request in part to validate what I was writing in WebGL Insights.  It turned out to be a LOT more work than expected and I possibly should have taken better stock of other alternatives somewhere along the way.  The good news is, the changes to all the async tests to use promises are valuable pretty much no matter what test framework we use.\r\n\r\n> What about Karma?  Upgrading to JSCover?  Implementing my favorite feature?\r\n\r\nMaybe, but let's merge this first so my life sucks less. :)\r\n"},"comment":{"url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/comments/74794164","html_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/2495#issuecomment-74794164","issue_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/2495","id":74794164,"user":{"login":"kring","id":924374,"avatar_url":"https://avatars.githubusercontent.com/u/924374?v=3","gravatar_id":"","url":"https://api.github.com/users/kring","html_url":"https://github.com/kring","followers_url":"https://api.github.com/users/kring/followers","following_url":"https://api.github.com/users/kring/following{/other_user}","gists_url":"https://api.github.com/users/kring/gists{/gist_id}","starred_url":"https://api.github.com/users/kring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kring/subscriptions","organizations_url":"https://api.github.com/users/kring/orgs","repos_url":"https://api.github.com/users/kring/repos","events_url":"https://api.github.com/users/kring/events{/privacy}","received_events_url":"https://api.github.com/users/kring/received_events","type":"User","site_admin":false},"created_at":"2015-02-18T01:32:46Z","updated_at":"2015-02-18T01:32:46Z","body":"> Did you test in IE? I don't get this failure in master:\r\n\r\nI'm not getting anywhere quickly on this one.  I also see the failure, and don't see it in master.  It doesn't happen when I run the test by itself.  The test is a little sketchy in that it tries to set the camera position/orientation, but that doesn't actually work in our tests.  Even if I remove that code, the tests still pass in other browsers but not IE.  Presumably it's an order or timing problem.\r\n\r\nIt's going to take awhile to debug because it only happens when running all tests, and for reasons that are unclear IE11 is only able to run the test suite without hundreds of failures maybe one out of five times on my system.  The other 4/5 times, context creation starts failing. midway through.\r\n\r\nSo, any ideas welcome!"}}