{"action":"created","issue":{"url":"https://api.github.com/repos/mmanela/chutzpah/issues/431","repository_url":"https://api.github.com/repos/mmanela/chutzpah","labels_url":"https://api.github.com/repos/mmanela/chutzpah/issues/431/labels{/name}","comments_url":"https://api.github.com/repos/mmanela/chutzpah/issues/431/comments","events_url":"https://api.github.com/repos/mmanela/chutzpah/issues/431/events","html_url":"https://github.com/mmanela/chutzpah/issues/431","id":116568212,"number":431,"title":"Chutzpah fails build with empty test, but locally marks test as pass","user":{"login":"bluerv","id":524497,"avatar_url":"https://avatars.githubusercontent.com/u/524497?v=3","gravatar_id":"","url":"https://api.github.com/users/bluerv","html_url":"https://github.com/bluerv","followers_url":"https://api.github.com/users/bluerv/followers","following_url":"https://api.github.com/users/bluerv/following{/other_user}","gists_url":"https://api.github.com/users/bluerv/gists{/gist_id}","starred_url":"https://api.github.com/users/bluerv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluerv/subscriptions","organizations_url":"https://api.github.com/users/bluerv/orgs","repos_url":"https://api.github.com/users/bluerv/repos","events_url":"https://api.github.com/users/bluerv/events{/privacy}","received_events_url":"https://api.github.com/users/bluerv/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-11-12T15:07:52Z","updated_at":"2016-03-16T15:07:54Z","closed_at":null,"body":"Workaround is obvious... mark the test with \"xit\".  But...\r\n\r\nGiven a test with no expectations:\r\n\r\ndescribe(\"Empty Test\", function () {\r\n    it(\"should fail\", function () {\r\n    });\r\n});\r\n\r\nLocally, this test passes (context menu):\r\n\r\n1 passed, 0 failed, 1 total (chutzpah).\r\n\r\n========== Total Tests: 1 passed, 0 failed, 1 total ==========\r\n\r\nAnd it passes in the text explorer as well:\r\n\r\nTest Name:\tEmpty Test should fail\r\nTest FullName:\td:\\2012devel\\..\\branches\\dev\\...\\tests\\...\\controllers\\temporarytest.js::empty test::should fail\r\nTest Source:\td:\\2012devel\\...\\branches\\dev\\...\\tests\\...\\controllers\\temporarytest.js : line 3\r\nTest Outcome:\tPassed\r\nTest Duration:\t0:00:00.002\r\n\r\n\r\nOn the server, however, this test causes the build to fail:\r\n\r\nError: Spec 'Empty Test should fail' has no expectations.\r\nat specDone in file:///C:/Builds/5/.../src/packages/Chutzpah.4.1.0/tools/TestFiles/jasmine/v2/jasmine-html.js (line 105)\r\nWhile Running:C:\\Builds\\5...\\bin\\_PublishedWebsites\\...\\Tests\\...\\controllers\\TemporaryTest.js\r\n\r\n\r\nNote:  The failure does show up, on careful inspection, when run locally but only through the \"Run JS Tests\" context menu.  Unfortunately, in long test runs, it will be obscured by the other tests, and by the final test status (above).  However, there is no indication of a problem in the Test Explorer.  \r\n\r\nRecommendation:  Mark the test as failed, or change the message to \"Warning\" in the output.\r\n"},"comment":{"url":"https://api.github.com/repos/mmanela/chutzpah/issues/comments/197374109","html_url":"https://github.com/mmanela/chutzpah/issues/431#issuecomment-197374109","issue_url":"https://api.github.com/repos/mmanela/chutzpah/issues/431","id":197374109,"user":{"login":"bluerv","id":524497,"avatar_url":"https://avatars.githubusercontent.com/u/524497?v=3","gravatar_id":"","url":"https://api.github.com/users/bluerv","html_url":"https://github.com/bluerv","followers_url":"https://api.github.com/users/bluerv/followers","following_url":"https://api.github.com/users/bluerv/following{/other_user}","gists_url":"https://api.github.com/users/bluerv/gists{/gist_id}","starred_url":"https://api.github.com/users/bluerv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluerv/subscriptions","organizations_url":"https://api.github.com/users/bluerv/orgs","repos_url":"https://api.github.com/users/bluerv/repos","events_url":"https://api.github.com/users/bluerv/events{/privacy}","received_events_url":"https://api.github.com/users/bluerv/received_events","type":"User","site_admin":false},"created_at":"2016-03-16T15:07:54Z","updated_at":"2016-03-16T15:07:54Z","body":"If I\"m understanding correctly, you're just looking to ensure that no exceptions are thrown during the unit tests.  (If that's not right, then I'm not sure what exactly you're testing?)\nIf that's the case, just put an expect(true); and the jasmine test runner will stop complaining (and it will never fail due to a failed expectation obviously).\n\nSent from Yahoo Mail on Android \n \n  On Wed, Mar 16, 2016 at 11:04 AM, laxmiakntkalkote<notifications@github.com> wrote:   \nThanks for quick response sir...\n\nActually we have facing one more issue related this...\n\nwe have void functions in js file.\n\nso we want to achieve code coverage with the help of chutzpa .\n\nwe used only expect() n we r not comparing anything because that function is void.\nfor instancce expect($scope.onclick)\n\nTest is running successfully but while taking build giving same error \"Error: Spec 'Empty Test should fail' has no expectations.\" \n\nso could you tell me way to avoid message during build and is there way to handle void functions in jasmine?\n\nThanks in advance... \n\n—\nYou are receiving this because you authored the thread.\nReply to this email directly or view it on GitHub\n    \n"}}