@blink1073 I set up a simple project with Karma & StealJS. Like @matthewp mentioned, it’s a lot like setting up Karma with RequireJS. The biggest difference is that you’ll need to manually set Karma to run asynchronously. This is normally done by the karma-requirejs adapter.

I used karma init to create a base karma.conf.js file with most of the default values. Then I added file patterns for all of the files that would be loaded by Steal. These are set as included: false so that Karma will not create script tags for them. I then added Steal and karma.bootstrap.js. karma.bootstrap.js will run the code @matthewp gave above, you can call it whatever you want. It’s discussed more below.

The karma.bootstrap.js file just needs to overwrite the window.__karma__.loaded function. This function normally starts Karma, but we need it to configure Steal and then start Karma once Steal is done. Here’s what karma.bootstrap.js looks like in my project:

Be sure to make the appropriate changes to the path to your tests and the Spec qualifier (I use -test instead of Spec). Note, you need to strip off the ‘/base/’ from the beginning of each test file name.