How To Install libjs-qunit on Kali Linux
Introduction
In this tutorial we learn how to install libjs-qunit
on Kali Linux.
What is libjs-qunit
libjs-qunit is:
QUnit is a powerful, easy-to-use, JavaScript test suite. It’s used by the jQuery project to test its code and plugins but is capable of testing any generic JavaScript code (and even capable of testing JavaScript code on the server-side).
QUnit is especially useful for regression testing: Whenever a bug is reported, write a test that asserts the existence of that particular bug. Then fix it and commit both. Every time you work on the code again, run the tests. If the bug comes up again - a regression - you’ll spot it immediately and know how to fix it, because you know what code you just changed.
Having good unit test coverage makes safe refactoring easy and cheap. You can run the tests after each small refactoring step and always know what change broke something.
QUnit is similar to other unit testing frameworks like JUnit, but makes use of the features JavaScript provides and helps with testing code in the browser, e.g. with its stop/start facilities for testing asynchronous code.
There are three methods to install libjs-qunit
on Kali Linux. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install libjs-qunit Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install libjs-qunit
using apt-get
by running the following command:
sudo apt-get -y install libjs-qunit
Install libjs-qunit Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install libjs-qunit
using apt
by running the following command:
sudo apt -y install libjs-qunit
Install libjs-qunit Using aptitude
If you want to follow this method, you might need to install aptitude on Kali Linux first since aptitude is usually not installed by default on Kali Linux. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install libjs-qunit
using aptitude
by running the following command:
sudo aptitude -y install libjs-qunit
How To Uninstall libjs-qunit on Kali Linux
To uninstall only the libjs-qunit
package we can use the following command:
sudo apt-get remove libjs-qunit
Uninstall libjs-qunit And Its Dependencies
To uninstall libjs-qunit
and its dependencies that are no longer needed by Kali Linux, we can use the command below:
sudo apt-get -y autoremove libjs-qunit
Remove libjs-qunit Configurations and Data
To remove libjs-qunit
configuration and data from Kali Linux we can use the following command:
sudo apt-get -y purge libjs-qunit
Remove libjs-qunit configuration, data, and all of its dependencies
We can use the following command to remove libjs-qunit
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge libjs-qunit
Dependencies
libjs-qunit have the following dependencies:
References
Summary
In this tutorial we learn how to install libjs-qunit
package on Kali Linux using different package management tools: apt
, apt-get
and aptitude
.