dieterich-lab / scimodom

GNU Affero General Public License v3.0
0 stars 0 forks source link

Testing #1

Closed eboileau closed 1 year ago

eboileau commented 4 years ago

nosetests FAILED (errors=12, failures=5)

eboileau commented 1 year ago

Actually all tests fail.

Unit testing for NodeJS is done using Mocha and Chai. There is do documentation on how to perform the tests, and the requirements are apparently not even installed (actually to install node.js we would need a conda environment). Alternatively, I pulled a singularity container for mocha-phantomjs. I'm not sure runner.html is adequately formatted? Running

 singularity run --bind webdorina/test/:/test/ --bind webdorina/static/:/static/ mocha-phantomjs.sif mocha-phantomjs --debug=yes /test/runner.html

results in SyntaxError: Parse error that is not easy to debug... Running node on selected files is useless, since some objects only exist in browser context (or are relevant for mocha).

As for nosetests -v, the config needs to be changed, but still we have Error 111 connecting to localhost:6379. Connection refused. I don't know if fakeredis actually needs redis running? I need to check the docs. In any case, if tests are run using e.g. a real client instance (redis server running on localhost), this may actually wipe the database, so before going further I need to familiarise with the testing framework (incl. Mocha and Chai).