{"action":"created","issue":{"url":"https://api.github.com/repos/project-hatohol/hatohol/issues/2031","repository_url":"https://api.github.com/repos/project-hatohol/hatohol","labels_url":"https://api.github.com/repos/project-hatohol/hatohol/issues/2031/labels{/name}","comments_url":"https://api.github.com/repos/project-hatohol/hatohol/issues/2031/comments","events_url":"https://api.github.com/repos/project-hatohol/hatohol/issues/2031/events","html_url":"https://github.com/project-hatohol/hatohol/issues/2031","id":133602623,"number":2031,"title":"mochaを利用したbrowser testでJS consoleにエラーがいっぱい","user":{"login":"kz0817","id":2610513,"avatar_url":"https://avatars.githubusercontent.com/u/2610513?v=3","gravatar_id":"","url":"https://api.github.com/users/kz0817","html_url":"https://github.com/kz0817","followers_url":"https://api.github.com/users/kz0817/followers","following_url":"https://api.github.com/users/kz0817/following{/other_user}","gists_url":"https://api.github.com/users/kz0817/gists{/gist_id}","starred_url":"https://api.github.com/users/kz0817/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kz0817/subscriptions","organizations_url":"https://api.github.com/users/kz0817/orgs","repos_url":"https://api.github.com/users/kz0817/repos","events_url":"https://api.github.com/users/kz0817/events{/privacy}","received_events_url":"https://api.github.com/users/kz0817/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-02-15T01:49:38Z","updated_at":"2016-02-18T05:43:32Z","closed_at":null,"body":"テスト自体は、成功しているし、実運用でこのエラーは出てないが、気持ち悪いの原因を特定したい。\r\n\r\n![webtest-error](https://cloud.githubusercontent.com/assets/2610513/13038119/b2abf786-d3d1-11e5-8f35-5faac23bbc92.png)\r\n"},"comment":{"url":"https://api.github.com/repos/project-hatohol/hatohol/issues/comments/185551734","html_url":"https://github.com/project-hatohol/hatohol/issues/2031#issuecomment-185551734","issue_url":"https://api.github.com/repos/project-hatohol/hatohol/issues/2031","id":185551734,"user":{"login":"cosmo0920","id":700876,"avatar_url":"https://avatars.githubusercontent.com/u/700876?v=3","gravatar_id":"","url":"https://api.github.com/users/cosmo0920","html_url":"https://github.com/cosmo0920","followers_url":"https://api.github.com/users/cosmo0920/followers","following_url":"https://api.github.com/users/cosmo0920/following{/other_user}","gists_url":"https://api.github.com/users/cosmo0920/gists{/gist_id}","starred_url":"https://api.github.com/users/cosmo0920/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cosmo0920/subscriptions","organizations_url":"https://api.github.com/users/cosmo0920/orgs","repos_url":"https://api.github.com/users/cosmo0920/repos","events_url":"https://api.github.com/users/cosmo0920/events{/privacy}","received_events_url":"https://api.github.com/users/cosmo0920/received_events","type":"User","site_admin":false},"created_at":"2016-02-18T05:43:32Z","updated_at":"2016-02-18T05:43:32Z","body":"新し目のmocha-phantomJSの場合は以下のようにすると動くようになります:\r\n\r\n```diff\r\ndiff --git a/client/test/browser/index.html b/client/test/browser/index.html\r\nindex 534dd53..62e4733 100644\r\n--- a/client/test/browser/index.html\r\n+++ b/client/test/browser/index.html\r\n@@ -13,7 +13,12 @@\r\n <script src=\"../../static/js.external/spectrum.js\"></script>\r\n <script src=\"mocha.js\"></script>\r\n <script src=\"expect.js\"></script>\r\n-<script>mocha.setup('bdd');</script>\r\n+<script>\r\n+  if (window.initMochaPhantomJS) {\r\n+    window.initMochaPhantomJS();\r\n+  }\r\n+  mocha.setup('bdd');\r\n+</script>\r\n <script src=\"sinon.js\"></script>\r\n <script>\r\n   if (typeof(HATOHOL_PROJECT_TOP_PATH) == \"undefined\")\r\n```\r\n\r\nこの際、クライアント側のJavaScriptのタスクはどんどんGulpfile.jsにまとめていくのがいいのかなぁと思っていたりします。"}}