I have a module, I am testing this module using mocha-phantomjs. I created package.json
file
{
"name" : "demo-test",
"scripts": {
"test": "npm run test-debug",
"test-debug": "mocha-phantomjs ./test/Test1.html"
},
"dependencies" : {
"mocha" : "1.13.x",
"commander" : "1.2.x",
"which" : "~1.0.5",
"mocha-phantomjs": "3.3.2"
},
"devDependencies" : {
"chai" : "1.8.x",
"coffee-script" : "1.6.x",
"requirejs" : "2.1.x",
"jquery" : "2.1.0"
}
}
Then I run npm install
and then npm test
to run the test. It works fine and run the tests of test1.html
.
Now I want that all the files (test1, test2, ...) under test directory get executed on running npm test
.
I can run all html files by calling then individually in package.json file but if there is a way to load all Html files.