• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

sinonjs / sinon / 1694 / 2
94%
master: 94%

Build:
DEFAULT BRANCH: master
Ran 24 Mar 2017 02:02AM UTC
Files 80
Run time 4s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Mar 2017 02:01AM UTC coverage: 95.375% (+0.003%) from 95.372%
1694.2

Pull #1364

travis-ci

web-flow
Added setPromise method to stub.

The setPromise method allows the setting of the promise library
that will be used by the resolve and reject method. If it is not set then it will use the default promise implementation by default.

Example:

```js
var assert = require("assert");
var bluebird = require("bluebird");
var sinon = require("sinon");

my myObject = {};
var myStub = sinon.stub()
    .setPromise(bluebird.Promise)
    .resolves(myObject);

myStub
    // Tap should now be available!!!
    .tap(function(actual) {
        assert.strictEqual(actual, myObject);
    })
    .catch(function(err) {
        console.err("Error", err);
    })
```

Documentation still to come.
Pull Request #1364: Added setPromise method to stub.

1233 of 1492 branches covered (82.64%)

Branch coverage included in aggregate %.

11610 of 12173 relevant lines covered (95.38%)

78.76 hits per line

Source Files on job 1694.2
  • Tree
  • List 0
  • Changed 10
  • Source Changed 3
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 1694
  • Travis Job 1694.2
  • 98bbf037 on github
  • Prev Job for on master (#1684.2)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc