{"action":"created","issue":{"url":"https://api.github.com/repos/labrad/scalabrad-web/issues/106","labels_url":"https://api.github.com/repos/labrad/scalabrad-web/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/labrad/scalabrad-web/issues/106/comments","events_url":"https://api.github.com/repos/labrad/scalabrad-web/issues/106/events","html_url":"https://github.com/labrad/scalabrad-web/pull/106","id":118293076,"number":106,"title":"Implement unit testing with Jasmine","user":{"login":"joshmutus","id":8173925,"avatar_url":"https://avatars.githubusercontent.com/u/8173925?v=3","gravatar_id":"","url":"https://api.github.com/users/joshmutus","html_url":"https://github.com/joshmutus","followers_url":"https://api.github.com/users/joshmutus/followers","following_url":"https://api.github.com/users/joshmutus/following{/other_user}","gists_url":"https://api.github.com/users/joshmutus/gists{/gist_id}","starred_url":"https://api.github.com/users/joshmutus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshmutus/subscriptions","organizations_url":"https://api.github.com/users/joshmutus/orgs","repos_url":"https://api.github.com/users/joshmutus/repos","events_url":"https://api.github.com/users/joshmutus/events{/privacy}","received_events_url":"https://api.github.com/users/joshmutus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-11-22T22:15:27Z","updated_at":"2015-12-08T02:49:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/labrad/scalabrad-web/pulls/106","html_url":"https://github.com/labrad/scalabrad-web/pull/106","diff_url":"https://github.com/labrad/scalabrad-web/pull/106.diff","patch_url":"https://github.com/labrad/scalabrad-web/pull/106.patch"},"body":"Sooooooo... I don't know how I elegant this is, but I have unit tests that are written in typescript that will compile and run in jasmine with gulp.\r\n\r\nTo use this branch, you have to install the dependencies\r\n```\r\nnpm install jasmine\r\ntsd install jasmine\r\nnpm install gulp-jasmine-browser\r\n```\r\nThen you'll have to do a \r\n```\r\ngulp clean\r\n```\r\nsince I had to re-structure the .tmp folder for everything to play nice. To run the tests type:\r\n```\r\ngulp jasmine\r\n```\r\nWhich will start a server listening on localhost:8888 and you will need to point your browser there to see the results of your tests. The tests have to be run in a browser or else I get a [```ReferenceError: window is not defined``` error](http://stackoverflow.com/questions/27224919/gulp-jasmine-window-is-not-defined-error)\r\n\r\nFirst of all let me know how it runs. I kind of wanted to just get something out there for people to see so I didn't get too deep if there are any misgivings.\r\n\r\nBut I think it checks all the boxes, we can write all our tests in typescript (and use help from a compiler), it sorta integrates with our build, using the same ES6 modules, etc and it uses gulp without adding too much foreign machinery. \r\n\r\nI'm not sure if the test I wrote for ```Observable``` is total nonsense. I just messed with it untill I got something to compile and pass :0"},"comment":{"url":"https://api.github.com/repos/labrad/scalabrad-web/issues/comments/162742067","html_url":"https://github.com/labrad/scalabrad-web/pull/106#issuecomment-162742067","issue_url":"https://api.github.com/repos/labrad/scalabrad-web/issues/106","id":162742067,"user":{"login":"maffoo","id":129268,"avatar_url":"https://avatars.githubusercontent.com/u/129268?v=3","gravatar_id":"","url":"https://api.github.com/users/maffoo","html_url":"https://github.com/maffoo","followers_url":"https://api.github.com/users/maffoo/followers","following_url":"https://api.github.com/users/maffoo/following{/other_user}","gists_url":"https://api.github.com/users/maffoo/gists{/gist_id}","starred_url":"https://api.github.com/users/maffoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maffoo/subscriptions","organizations_url":"https://api.github.com/users/maffoo/orgs","repos_url":"https://api.github.com/users/maffoo/repos","events_url":"https://api.github.com/users/maffoo/events{/privacy}","received_events_url":"https://api.github.com/users/maffoo/received_events","type":"User","site_admin":false},"created_at":"2015-12-08T02:49:04Z","updated_at":"2015-12-08T02:49:04Z","body":"A couple of nits about formatting, otherwise LGTM."}}