karma-should
Use should.js with karma tests
Last updated 5 years ago by ruimarinho .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install karma-should 
SYNC missed versions from official npm registry.

karma-should

Use should.js (2.0.2+) with karma tests.

Status

npm version

Installation

Install the package via npm:

$ npm install karma-should --save

Usage

Add should as part of frameworks property configuration of karma. In the following example, the testing framework mocha is also included although not required.

module.exports = function(config) {
  config.set({
    frameworks: ['mocha', 'should']
  });
};

By default, karma loads all plugins that are siblings to it and their name matches karma-* so no additional configuration is required.

Load karma and all should assertions will now available in the tests:

describe('karma tests with should', function() {
  var user = {
    name: 'foo'
  };

  it('should have a name', function() {
    user.should.have.property('name', 'foo');
  });
});

License

MIT

Current Tags

  • 1.0.0                                ...           latest (5 years ago)

2 Versions

  • 1.0.0                                ...           5 years ago
  • 0.0.1                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 2
This Month 3
Last Day 2
Last Week 1
Last Month 9
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (2)

Copyright 2014 - 2016 © taobao.org |