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

sinonjs / sinon / 1422
94%

Build:
DEFAULT BRANCH: master
Ran 23 Dec 2016 10:58AM UTC
Jobs 3
Files 70
Run time 2min
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

pending completion
1422

push

travis-ci

fatso83
Add .resolves and .rejects to stub (#1211)

* Add .resolves and .rejects to stub

This commit adds the possibility for a stub
to be configured to return a promise which will
either resolves or reject

This was already possible, but this adds a shorthand for it

stub.returns(Promise.resolve({})) -> stub.resolve({})
stub.returns(Promise.reject(new Error("bad luck"))) -> stub.rejects("bad luck")

Since Promise are now part of the standard ES6 features, this
commit does not make use of polyfill or third party library.
This is problematic for some browsers and generally for contexts where
the standard is not implemented.

* Use native-promise-only for .resolves and .rejects

* change test titles for chainable methods

11484 of 11917 relevant lines covered (96.37%)

251.15 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
4
100.0
sinon/behavior.js
25
100.0
../test/stub-test.js
Jobs
ID Job ID Ran Files Coverage
1 1422.1 23 Dec 2016 10:58AM UTC 0
96.37
Travis Job 1422.1
2 1422.2 23 Dec 2016 10:58AM UTC 0
96.37
Travis Job 1422.2
3 1422.3 23 Dec 2016 11:00AM UTC 0
96.37
Travis Job 1422.3
Source Files on build 1422
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1422
  • 2df140fa on github
  • Prev Build on master (#1420)
  • Next Build on master (#1428)
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