{"action":"created","issue":{"url":"https://api.github.com/repos/cybertk/abao/issues/37","labels_url":"https://api.github.com/repos/cybertk/abao/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/cybertk/abao/issues/37/comments","events_url":"https://api.github.com/repos/cybertk/abao/issues/37/events","html_url":"https://github.com/cybertk/abao/issues/37","id":77055054,"number":37,"title":"npm test fails on Windows","user":{"login":"maruLoop","id":1451265,"avatar_url":"https://avatars.githubusercontent.com/u/1451265?v=3","gravatar_id":"","url":"https://api.github.com/users/maruLoop","html_url":"https://github.com/maruLoop","followers_url":"https://api.github.com/users/maruLoop/followers","following_url":"https://api.github.com/users/maruLoop/following{/other_user}","gists_url":"https://api.github.com/users/maruLoop/gists{/gist_id}","starred_url":"https://api.github.com/users/maruLoop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maruLoop/subscriptions","organizations_url":"https://api.github.com/users/maruLoop/orgs","repos_url":"https://api.github.com/users/maruLoop/repos","events_url":"https://api.github.com/users/maruLoop/events{/privacy}","received_events_url":"https://api.github.com/users/maruLoop/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-16T14:49:59Z","updated_at":"2015-05-28T06:24:29Z","closed_at":null,"body":"Hi.\r\n\r\nI cannot run `npm test` on Windows.\r\nDo you have any tips/help?\r\n\r\n```sh\r\n>npm test\r\n\r\n> abao@0.3.1 test C:\\abao\r\n> grunt test\r\n\r\nRunning \"coffeecov:compile\" (coffeecov) task\r\n>> Annotated 250 lines.\r\n\r\nRunning \"mochaTest:test\" (mochaTest) task\r\n\r\n\r\n  Abao\r\n    #constructor\r\n      with valid config\r\n        √ should created a new instance\r\n    #run\r\n      √ should invoke callback\r\n\r\n  addHooks(hooks, pattern, callback)\r\n    with no pattern\r\n      √ should return immediately\r\n    with valid pattern\r\n      √ should return files (1250ms)\r\n      when files are valid js/coffeescript\r\n        1) should load the files\r\n        2) should attach the hooks\r\n      when there is an error reading the hook files\r\n        √ should log an warning\r\n        √ should not attach the hooks\r\n\r\n  #addTests\r\n    #run\r\n      when raml contains single get\r\n        √ should run callback\r\n        √ should added 1 test\r\n        √ should set test.name\r\n        √ should setup test.request\r\n        √ should setup test.response\r\n      when raml contains one GET and one POST\r\n        √ should run callback\r\n        √ should added 2 test\r\n        √ should setup test.request of POST\r\n        √ should setup test.response of POST\r\n      when raml contains three-levels endpoints\r\n        √ should run callback\r\n        √ should added 3 test\r\n        √ should set test.name\r\n        √ should set request.param of test 1\r\n        √ should set request.param of test 2\r\n      when raml has resource not defined method\r\n        √ should run callback\r\n        √ should added 1 test\r\n        √ should set test.name\r\n      when raml has invalid request body example\r\n        √ should run callback\r\n        √ should give a warning\r\n        √ should added 1 test\r\n\r\n  Hooks\r\n    when adding before hook\r\n      √ should add to hook collection\r\n    when adding after hook\r\n      √ should add to hook collection\r\n    when adding beforeAll hooks\r\n      √ should invoke registered callbacks\r\n    when adding afterAll hooks\r\n      √ should callback if registered\r\n    when check has name\r\n      √ should return true if in before hooks\r\n      √ should return true if in after hooks\r\n      √ should return true if in both before and after hooks\r\n      √ should return false if in neither before nor after hooks\r\n    when running hooks\r\n      with correponding test\r\n        on before hook\r\n          √ should run hook\r\n          √ should pass #test to hook\r\n        on after hook\r\n          √ should run hook\r\n          √ should pass #test to hook\r\n      with incorreponding test\r\n        on before hook\r\n          √ should not run hook\r\n        on after hook\r\n          √ should not run hook\r\n    when running beforeAll/afterAll\r\n      on beforeAll hook\r\n        √ should invoke callback\r\n        √ should run hook\r\n      on afterAll hook\r\n        √ should invoke callback\r\n        √ should run hook\r\n\r\n  Test Runner\r\n    #run\r\n      when test is valid\r\n        √ should generate beforeAll hooks\r\n        √ should run mocha\r\n        √ should invoke callback with failures\r\n        √ should generated mocha suite\r\n        √ should generated mocha test\r\n        √ should generated hook of suite\r\n      Interact with #test\r\n        √ should called #test.run\r\n      when test has no respones code\r\n        √ should run mocha\r\n        √ should generated mocha suite\r\n        √ should generated pending mocha test\r\n      when test has no response schema\r\n        √ should run mocha\r\n        √ should generated mocha suite\r\n        √ should not generated pending mocha test\r\n      when test throws AssertionError\r\n        √ should call afterAll hook\r\n      when beforeAllHooks throws Uncaught Error\r\n        √ should call afterAll hook\r\n    #run with options\r\n      list all tests with `names`\r\n        √ should not run mocha\r\n        √ should print tests\r\n      add additional headers with `headers`\r\n        √ should run mocha\r\n        √ should add headers into test\r\n      run test with hooks only indicated by `hooks-only`\r\n        √ should run mocha\r\n        √ should add a pending test\r\n\r\n  Test\r\n    #run\r\n      of simple test\r\n        √ should call #request\r\n        √ should not modify @name\r\n        √ should not modify @request\r\n        √ should update @response\r\n      of test contains params\r\n        √ should call #request\r\n        √ should not modify @name\r\n        √ should not modify @request\r\n        √ should update @response\r\n    #url\r\n      when call with path does not contain param\r\n        √ should return origin path\r\n      when call with path contains param\r\n        √ should replace all params\r\n        √ should not touch origin request.path\r\n    #assertResponse\r\n      when against valid response\r\n        √ should should pass all asserts\r\n      when response body is null\r\n        √ should throw AssertionError (90ms)\r\n      when response body is invalid json\r\n        √ should throw AssertionError\r\n\r\n  Command line interface\r\n    When raml file not found\r\n      √ should exit with status 1\r\n      3) should print error message to stderr\r\n    Arguments with existing raml and responding server\r\n      when executing the command and the server is responding as specified in the raml\r\n        4) exit status should be 0\r\n        5) should print count of tests will run\r\n        6) should print correct title for response\r\n      when executing the command and raml includes other ramls\r\n        7) exit status should be 0\r\n        8) should print count of tests will run\r\n    when called with arguments\r\n      when using additional reporters with -r\r\n        9) should print using the new reporter\r\n      when adding additional headers with -h\r\n        10) should have an additional header in the request\r\n        11) exit status should be 0\r\n        12) should print count of tests will run\r\n      when printing test cases with -n\r\n        13) exit status should be 0\r\n        14) should print names\r\n        √ should not run tests\r\n      when loading hooks with --hookfiles\r\n        15) should modify the transaction with hooks\r\n        16) should print message to stdout and stderr\r\n      when run with --hooks-only\r\n        17) exit status should be 0\r\n        18) should not run test without hooks\r\n      when run with --timeout\r\n        √ exit status should be 1\r\n        19) should exit before timeout\r\n        20) should not run test without hooks\r\n      when run with --reporters\r\n        21) exit status should be 0\r\n        √ should print reporters same as `mocha --reporters`\r\n\r\n\r\n  83 passing (9s)\r\n  21 failing\r\n\r\n  1) addHooks(hooks, pattern, callback) with valid pattern when files are valid js/coffeescript should load the files:\r\n     Error: timeout of 2000ms exceeded. Ensure the done() callback is being called in this test.\r\n    at C:\\abao\\test\\unit\\add-hooks-test.coffee:66:11\r\n    at Context.<anonymous> (C:\\abao\\test\\unit\\add-hooks-test.coffee:61:9)\r\n\r\n\r\n  2) addHooks(hooks, pattern, callback) with valid pattern when files are valid js/coffeescript should attach the hooks:\r\n     Error: timeout of 2000ms exceeded. Ensure the done() callback is being called in this test.\r\n    at C:\\abao\\test\\unit\\add-hooks-test.coffee:74:11\r\n    at Context.<anonymous> (C:\\abao\\test\\unit\\add-hooks-test.coffee:69:9)\r\n\r\n\r\n  3) Command line interface When raml file not found should print error message to stderr:\r\n     AssertionError: expected '\\'.\\' �́A�����R�}���h�܂��͊O���R�}���h�A\\r\\n�����\\\\�ȃv���O�����܂��̓o�b�` �t�@�C���Ƃ��ĔF�������Ă��܂����B\\r\\n' to include 'Error: ENOENT, open'\r\n    at Context.<anonymous> (C:\\abao\\test\\cli-test.coffee:49:14)\r\n\r\n\r\n  4) Command line interface Arguments with existing raml and responding server when executing the command and the server is responding as specified in the raml exit status should be 0:\r\n     AssertionError: expected 1 to equal 0\r\n    at Context.<anonymous> (C:\\abao\\test\\cli-test.coffee:75:16)\r\n\r\n\r\n  5) Command line interface Arguments with existing raml and responding server when executing the command and the server is responding as specified in the raml should print count of tests will\r\n     TypeError: Cannot read property 'length' of undefined\r\n    at Context.<anonymous> (C:\\abao\\test\\cli-test.coffee:78:37)\r\n\r\n\r\n  6) Command line interface Arguments with existing raml and responding server when executing the command and the server is responding as specified in the raml should print correct title for r\r\n\r\n     TypeError: Cannot read property '0' of undefined\r\n    at Context.<anonymous> (C:\\abao\\test\\cli-test.coffee:82:35)\r\n\r\n\r\n  7) Command line interface Arguments with existing raml and responding server when executing the command and raml includes other ramls exit status should be 0:\r\n     AssertionError: expected 1 to equal 0\r\n    at Context.<anonymous> (C:\\abao\\test\\cli-test.coffee:105:16)\r\n\r\n\r\n  8) Command line interface Arguments with existing raml and responding server when executing the command and raml includes other ramls should print count of tests will run:\r\n     AssertionError: expected '' to include '1 passing'\r\n    at Context.<anonymous> (C:\\abao\\test\\cli-test.coffee:108:16)\r\n\r\n\r\n  9) Command line interface when called with arguments when using additional reporters with -r should print using the new reporter:\r\n     AssertionError: expected '' to include '1 passing'\r\n    at Context.<anonymous> (C:\\abao\\test\\cli-test.coffee:133:16)\r\n\r\n\r\n  10) Command line interface when called with arguments when adding additional headers with -h should have an additional header in the request:\r\n     TypeError: Cannot read property 'accept' of undefined\r\n    at Context.<anonymous> (C:\\abao\\test\\cli-test.coffee:160:45)\r\n\r\n\r\n  11) Command line interface when called with arguments when adding additional headers with -h exit status should be 0:\r\n     AssertionError: expected 1 to equal 0\r\n    at Context.<anonymous> (C:\\abao\\test\\cli-test.coffee:163:16)\r\n\r\n\r\n  12) Command line interface when called with arguments when adding additional headers with -h should print count of tests will run:\r\n     AssertionError: expected '' to include '1 passing'\r\n    at Context.<anonymous> (C:\\abao\\test\\cli-test.coffee:166:16)\r\n\r\n\r\n  13) Command line interface when called with arguments when printing test cases with -n exit status should be 0:\r\n     AssertionError: expected 1 to equal 0\r\n    at Context.<anonymous> (C:\\abao\\test\\cli-test.coffee:176:16)\r\n\r\n\r\n  14) Command line interface when called with arguments when printing test cases with -n should print names:\r\n     AssertionError: expected '' to include 'GET /machines -> 200'\r\n    at Context.<anonymous> (C:\\abao\\test\\cli-test.coffee:179:16)\r\n\r\n\r\n  15) Command line interface when called with arguments when loading hooks with --hookfiles should modify the transaction with hooks:\r\n     TypeError: Cannot read property 'header' of undefined\r\n    at Context.<anonymous> (C:\\abao\\test\\cli-test.coffee:210:46)\r\n\r\n\r\n  16) Command line interface when called with arguments when loading hooks with --hookfiles should print message to stdout and stderr:\r\n     AssertionError: expected '' to include 'before-hook-GET-machines'\r\n    at Context.<anonymous> (C:\\abao\\test\\cli-test.coffee:214:16)\r\n\r\n\r\n  17) Command line interface when called with arguments when run with --hooks-only exit status should be 0:\r\n     AssertionError: expected 1 to equal 0\r\n    at Context.<anonymous> (C:\\abao\\test\\cli-test.coffee:239:16)\r\n\r\n\r\n  18) Command line interface when called with arguments when run with --hooks-only should not run test without hooks:\r\n     AssertionError: expected '' to include '1 pending'\r\n    at Context.<anonymous> (C:\\abao\\test\\cli-test.coffee:242:16)\r\n\r\n\r\n  19) Command line interface when called with arguments when run with --timeout should exit before timeout:\r\n     AssertionError: expected false to be truthy\r\n\r\n\r\n\r\n  20) Command line interface when called with arguments when run with --timeout should not run test without hooks:\r\n     AssertionError: expected '' to include '0 passing'\r\n    at Context.<anonymous> (C:\\abao\\test\\cli-test.coffee:270:16)\r\n\r\n\r\n  21) Command line interface when called with arguments when run with --reporters exit status should be 0:\r\n     AssertionError: expected 1 to equal 0\r\n    at Context.<anonymous> (C:\\abao\\test\\cli-test.coffee:281:16)\r\n\r\n\r\n\r\n\r\nWarning: Task \"mochaTest:test\" failed. Use --force to continue.\r\n\r\nAborted due to warnings.\r\n\r\n\r\nExecution Time (2015-05-16 14:40:48 UTC)\r\nloading grunt-coffeecov   240ms  ███ 1%\r\ncoffeecov:compile         860ms  ████████ 5%\r\nloading grunt-mocha-test  359ms  ████ 2%\r\nmochaTest:test              17s  ████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ 92%\r\nTotal 18.5s\r\n\r\nnpm ERR! Test failed.  See above for more details.\r\nnpm ERR! not ok code 0\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/cybertk/abao/issues/comments/106193681","html_url":"https://github.com/cybertk/abao/issues/37#issuecomment-106193681","issue_url":"https://api.github.com/repos/cybertk/abao/issues/37","id":106193681,"user":{"login":"cybertk","id":455809,"avatar_url":"https://avatars.githubusercontent.com/u/455809?v=3","gravatar_id":"","url":"https://api.github.com/users/cybertk","html_url":"https://github.com/cybertk","followers_url":"https://api.github.com/users/cybertk/followers","following_url":"https://api.github.com/users/cybertk/following{/other_user}","gists_url":"https://api.github.com/users/cybertk/gists{/gist_id}","starred_url":"https://api.github.com/users/cybertk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cybertk/subscriptions","organizations_url":"https://api.github.com/users/cybertk/orgs","repos_url":"https://api.github.com/users/cybertk/repos","events_url":"https://api.github.com/users/cybertk/events{/privacy}","received_events_url":"https://api.github.com/users/cybertk/received_events","type":"User","site_admin":false},"created_at":"2015-05-28T06:24:29Z","updated_at":"2015-05-28T06:24:29Z","body":"Any update?"}}