node package manager
We need your input. Help make JavaScript better: Take the 2017 JavaScript Ecosystem survey »



Temporary Windows harness for busterjs (A browser JavaScript testing toolkit) until v1 is released with full support.


  1. Download phantomjs from
  2. Add path to directory containing "phantomjs.exe" to PATH environment variable.
  3. Use npm to install depedencies for node.
npm install buster
npm install buster-win

Using package.json to install

If your project has a package.json, you can install by doing the following:

Add "devDependencies" to the package.json file as below.

    "devDependencies": {
        "buster": "*",
        "buster-win": "*"

Run the npm command below.

npm install -dev


buster-win will execute all tests in a folder, matching a specified pattern.

  • Create a folder for your tests. Example: "test".

Inside that folder create the following:

  • A file "index.js" with the code below.
  • A "buster.js" config file.
var config = module.exports;
config["Node tests"] = {
    environment: "node",
    tests: [
config["Browser tests"] = {
    environment: "browser",
    rootPath: "../",
    sources: [
        "lib/mylib.js", // Paths are relative to config file 
        "lib/**/*.js"   // Glob patterns supported 
    tests: [
  • Tests using busterjs (
var buster = require('buster');
describe("My thing", function () {
    it("has the foo and bar", function () {
    it("states the obvious", function () {
  • Run the following command where "test" is the name of the folder containing your tests.
node test

Run With WebStorm

  1. Go to the "Run" menu and choose "Edit configurations...".
  2. Click on the "+" icon and choose "Node JS".
  3. Set "Working Directory" to the location of your "test" folder.
  4. Set "Path to Node App JS File" to "index.js" and click "OK".
  5. Click on the play icon next to your configuration in the toolbar.


Node Debugging

To debug Node scripts in WebStorm, simply follow the steps in "Run With WebStorm", but run in configuration in debug mode.

Browser Debugging

To debug Browser script, do the following:

  • Add "autoRun: false" to the configuration for the browser test as below.
config["Browser tests"] = {
    autoRun: false,
    environment: "browser",
    rootPath: "../",
    sources: [
    tests: [
  • Run the tests normally.
  • Open a Browser and go to http://localhost:1111.
  • Open the Browser debug tools.
  • Put a breakpoint in the test you would like to debug.
  • Refresh the page.

Additional Documentation

All additional documentation can be found at the official BusterJS Site