karma-jasmine
A Karma plugin - adapter for Jasmine testing framework.
Last updated 9 days ago by karmarunnerbot .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install karma-jasmine 
SYNC missed versions from official npm registry.

karma-jasmine

npm version npm downloads

Build Status Dependency Status devDependency Status

js-standard-style semantic-release

Adapter for the Jasmine testing framework.

Installation

$ npm install karma-jasmine --save-dev
$ npm install jasmine-core --save-dev

Configuration

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

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

If you want to run only some tests matching a given pattern you can do this in the following way

$ karma start &
$ karma run -- --grep=<pattern>

or

module.exports = function(config) {
  config.set({
    ...
    client: {
      args: ['--grep', '<pattern>'],
      ...
    }
  })
}

If you want to pass configuration options directly to jasmine you can do this in the following way

module.exports = function(config) {
  config.set({
    client: {
      jasmine: {
        random: true,
        seed: '4321',
        oneFailurePerSpec: true,
        failFast: true,
        timeoutInterval: 1000
      }
    }
  })
}

Debug by URL

Failing tests print a debug URL with ?spec=. Use it with --no_single_run and paste it into your browser to focus on a single failing test.

Sharding

By setting config.client.shardIndex and config.client.totalShards, you can run a subset of the full set of specs. Complete sharding support needs to be done in the process that calls karma, and would need to support test result integration across shards.

For more information on Karma see the homepage.

Current Tags

  • 0.2.2                                ...           2_0 (6 years ago)
  • 3.1.0                                ...           latest (9 days ago)

34 Versions

  • 3.1.0                                ...           9 days ago
  • 3.0.3                                ...           10 days ago
  • 3.0.1                                ...           12 days ago
  • 3.0.0                                ...           15 days ago
  • 2.0.1                                ...           a year ago
  • 2.0.0                                ...           a year ago
  • 1.1.2                                ...           2 years ago
  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           3 years ago
  • 1.0.2                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
  • 0.3.8                                ...           4 years ago
  • 0.3.7                                ...           4 years ago
  • 0.1.6                                ...           5 years ago
  • 0.3.6                                ...           5 years ago
  • 0.3.5                                ...           5 years ago
  • 0.3.4                                ...           5 years ago
  • 0.3.3                                ...           5 years ago
  • 0.3.2                                ...           5 years ago
  • 0.3.1                                ...           5 years ago
  • 0.3.0                                ...           5 years ago
  • 0.2.3                                ...           5 years ago
  • 0.2.2                                ...           6 years ago
  • 0.2.1                                ...           6 years ago
  • 0.2.0                                ...           6 years ago
  • 0.1.5                                ...           6 years ago
  • 0.1.4                                ...           6 years ago
  • 0.1.3                                ...           6 years ago
  • 0.1.2                                ...           6 years ago
  • 0.1.1                                ...           6 years ago
  • 0.1.0                                ...           6 years ago
  • 0.0.3                                ...           7 years ago
  • 0.0.2                                ...           7 years ago
  • 0.0.1                                ...           7 years ago
Downloads
Today 5
This Week 5,331
This Month 14,419
Last Day 297
Last Week 6,244
Last Month 25,717
Dependencies (1)
Dependents (646)

Copyright 2014 - 2016 © taobao.org |