clean up running the tests from a fresh clone

This commit is contained in:
Peter Snyder 2017-10-22 01:55:11 -05:00
parent b3a7659a6b
commit eccdc411db
2 changed files with 26 additions and 1 deletions

View file

@ -68,6 +68,30 @@ for future inclusion:
methods are interposed on).
Testing and Development
---
There is a [Mocha](https://mochajs.org/) and [Selenium](http://docs.seleniumhq.org/)
based test suite in place now. To run it you'll need to provide the test suite
with some GitHub and YouTube credentials (to make check for previous regressions
related to cookies and logging into sites).
To run the tests, give the following a try:
```
# install the development libraries
npm install dev
# copy the skelleton config file to where the test scripts expect it to be.
cp test.config.example.js test.config.js
# edit the new test config file to add github and google account credentials
vim test.config.js
# Run the test suite
npm run test
```
Background
---
This extension is based on research conducted at the [BITSLab](https://www.cs.uic.edu/Bits/)

View file

@ -21,10 +21,11 @@
],
"contributors": [],
"scripts": {
"clean": "rm -Rf dist/",
"bundle": "gulp && web-ext -s add-on -a dist build --overwrite-dest",
"firefox": "web-ext -s add-on run",
"test:lint": "node_modules/eslint/bin/eslint.js test/functional/*.js test/functional/**/*.js add-on/background_scripts/*.js add-on/config/js/*.js add-on/config/js/components/*.js add-on/lib/*.js add-on/content_scripts/*.js",
"test:func": "rm dist/* && npm run bundle && ln -s `ls dist/` dist/webapi_manager.zip && node_modules/mocha/bin/mocha test/functional/*.js",
"test:func": "npm run clean; npm run bundle && ln -s `ls dist/` dist/webapi_manager.zip && node_modules/mocha/bin/mocha test/functional/*.js",
"test": "npm run test:lint && npm run test:func"
},
"devDependencies": {