How to run QUnit tests from the command line?

I recently started working on a Rails application that already has a large number of QUnit tests for testing ember. I was instructed to install the application using CI (I decided to use CodeShip). The problem I'm facing right now is that the only way to run qunit tests is to go to http://localhost:3000/qunit . I need to configure the way to run tests from the command line. I did a lot of research and tried at least 10 different solutions, but couldn't work.

I'm currently trying to use teaspoon , but I was not able to get it to work. Any help is appreciated. Please let me know if I need to post additional installation information.

+6
source share
2 answers

node-qunit-phantomjs does its job fairly easily and autonomously, and not Grunt-, Gulp -, regardless of what the plugin is:

 $ npm install -g node-qunit-phantomjs $ node-qunit-phantomjs tests.html Testing tests.html Took 8 ms to run 1 tests. 0 passed, 1 failed. ... $ echo $? 1 
+9
source

For this you can use Grunt (task runner). You will also need to install these two packages: grunt-contrib-qunit and grunt-contrib-connect

I recently installed a GitHub repository while trying to figure out how to run QUnit on Travis CI: https://github.com/stebru/travis-qunit-test

You can fork out and try it yourself.

+2
source

Source: https://habr.com/ru/post/972097/


All Articles