karma-jasmine-web-worker

Run Karma and Jasmine tests in a web worker

Usage no npm install needed!

<script type="module">
  import karmaJasmineWebWorker from 'https://cdn.skypack.dev/karma-jasmine-web-worker';
</script>

README

karma-jasmine-web-worker

Fork of karma-jasmine to let specs run in web workers.

Installation

This plugin ships with Karma by default, so you don't need to install it, it should just work ;-)

The easiest way is to keep karma-jasmine as a devDependency in your package.json.

{
  "devDependencies": {
    "karma": "~0.10",
    "karma-jasmine-web-worker": "~0.1"
  }
}

You can simple do it by:

npm install karma-jasmine-web-worker --save-dev

Configuration

// karma.conf.js
module.exports = function(config) {
  config.set({
    frameworks: ['jasmine-web-worker'],

    files: [
      '*.js'
    ]
  });
};

For more information on Karma see the homepage.