How to run Jasmine tests from bash console?

I use Jasmine to write some unit tests for our frontend application. I would like to be able to run them from the console 1), because I think it is more convenient than launching them in a browser 2) in order to automate the execution of tests. What exactly do I need to do to configure this? Are there tools that already do this?

+4
source share
1 answer

Well, you should still run them in the browser, but there are several console tools that let you test the browser.

Yeoman - http://yeoman.io/ is a tool released by the Google dev team that includes phantomjs as part of the task of testing your code. Basically, it spins the mute browser, runs the tests, and then displays the results to the console.

Bunyip - http://ryanseddon.github.com/bunyip/ is also a great tool. It allows you to run tests in any browser that you can connect to (so you are not just attached to testing webkit, as with yoman / phantomjs). It has great integration with the browser, so you can automatically run the entire test suite on dozens of browsers.

You can also write a selenium test - http://seleniumhq.org - and run it through the command line.

+3
source

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


All Articles