This is an adapter for the Karma Test Runner for Js-Test-Driver.

Basically that means that if you use this, you should be able to use Karma instead of Js-Test-Driver, with out making any changes to your tests. It's possible I broke some things though.

Another adapter exists, but it takes a much different approach than this adapter does, by adding a layer on top of Jasmine to simulate the features of Js-Test-Driver. Because of this, it is not yet feature-complete (for example, while I was still using it, I had to write my own queue for AsyncTestCase.)

This adapter instead does a wholesale import of the JavaScript portions of Js-Test-Driver, and uses that to provide the hooks into Karma. This provides the advantage of having most/all of Js-Test-Driver's functionality, without the cost of having to write a layer on top of Jasmine or anything else. On the other hand, Js-Test-Driver is a complex beast, and I'm certain there's a lot of code we're pulling over from Js-Test-Driver that is never going to be run, but I don't have the time to figure out what parts we need, and what parts we don't.

## What Works

As far as I can tell, everything works. The only thing that probably doesn't work is Js-Test-Driver's HtmlDoc feature, I believe that was implemented in Java, and thus wasn't pulled over into this adapter. I don't use that feature, so I can't confirm whether it works or not. Hopefully it wouldn't be too implement that functionality if anyone needs it.

## Installing

Basically all you need is jstd-adapter.js, so you can either download it from GitHub, or you can use npm install karma-jstd-adapter. In either case, add jstd-adapter.js to the list of files Karma will load, and you'll be set to go.

## Building

"Building?" you ask, "What do you mean building?"

If you were looking at the files in this project, you may have noticed inserter.js and jstd-adapter-template.js. jstd-adapter-template.js contains the code that interfaces with Karma, but needs the Js-Test-Driver code to operate. inserter.js reads in the Js-Test-Driver code, does a few manipulations, and then inserts it into the text of jstd-adapter-template.js and produces jstd-adapter.js.

If you wanted to produce the jstd-adapter.js file yourself for whatever reason (say a new version of Js-Test-Driver comes out.), you'll need to do two things:

2. Unzip it somewhere.
3. Run node inserter.js C:\path\to\Js-Test-Driver\com\google\jstestdriver\javascript\

And you'll be good to go!

## Found a bug? Want to Contribute?

Feel free to fork the project, create a pull request, or file an issue in the bug tracker on GitHub.