atom-karma-test-runner

Run karma tests from atom. No server required.

DianaSuvorova

898

1

1.1.1

MIT

GitHub

Atom Karma Test Runner

Run karma tests directly from Atom IDE. No additional server or setup needed.

preview

Package settings:

Running:

Open a test file and Packages -> atom-karma-test-runner -> run from atom menu. This plugin looks for the closest package.json to the current file to get karma config file and karma executable.

Configuring plugin to execute a single file:

By default every singe test that is karma has been configured for will be executed. To run only a single file that is currently active in atom set runActiveFileOnly to true in the package settings and update karma.conf.js or karma configuration file as follows:

const defaultPath = 'lib/**/test/*.js' // the path you would normally configure karma
const path = (process.argv[process.argv.length - 1] || defaultPath);
module.exports = (config) => {
  config.set({
    ...
    files: [path],
    ...
  })
};

Please see complete example: karma.conf.js

Karma does not provide a standard documented way to run a single test or a file. Few options are available: