npm error ELIFECYCLE while running the test

前端 未结 4 1533
甜味超标
甜味超标 2020-12-15 18:33

I am using mocha-phantomjs setup for unit testing. I have following package.json scriot to run the tests.

\"scripts\": {
\"test\": \"npm run testFlickr\",
\"         


        
4条回答
  •  盖世英雄少女心
    2020-12-15 18:39

    This is a problem when using npm run, it has to do with Mocha exiting with code !== 0 whenever a test fails. If you are on Windows try this:

    "scripts": {
      "test": "npm run testFlickr || ECHO.",
      "testFlickr": "mocha-phantomjs ./test/FlickrTest.html || ECHO." 
    }
    

提交回复
热议问题