Although originally designed for use with Node.js, it can also be used directly in the browser.
Download the unit.js file. And then use a script tag:
<script src="unit.js"></script>
The global variable unitjs
becomes available after the above script tag.
If you are not already using a runner, I recommend Mocha which is easy to use and provides essential features. Mocha works on Node.js and browser.