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

krisselden / race-cancellation
100%
master: 98%

Build:
Build:
LAST BUILD BRANCH: dependabot/npm_and_yarn/lodash-4.17.19
DEFAULT BRANCH: master
Repo Added 11 May 2019 12:50AM UTC
Files 9
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

LAST BUILD ON BRANCH feat-race-promise
branch: feat-race-promise
CHANGE BRANCH
x
Reset
  • feat-race-promise
  • master
  • v0.4.0

pending completion
30

Pull #4

travis-ci

web-flow
feat: RaceCancellation PromiseLike support

Last update I removed the ability to pass in an
existing promise to RaceCancellation and this adds
it back.

The assumption of this library is you don't create
promises you are not ready to make part of the
current chain. So this was removed to simplify
code but the concept of not making promises before
you place them into the chain seems like a tough
hurdle for people to understand.

When people close over a promise to do
`await raceCancellation(() => promise)` when it is
already in the cancelled state, it will not invoke
the passed in task and create the `Promise.race`
which is a feature of this library. The issue with
this behavior, is if the promise isn't created by
the task but closed over, it has the potential to
trigger an unhandled promise rejection in this
scenario.

This change will always create the race regardless
of the cancellation state if you pass in a promise
like instead of a function which allows you to opt
out of the short circuiting.
Pull Request #4: feat: RaceCancellation PromiseLike support

43 of 43 branches covered (100.0%)

Branch coverage included in aggregate %.

2 of 2 new or added lines in 2 files covered. (100.0%)

82 of 82 relevant lines covered (100.0%)

49.72 hits per line

Relevant lines Covered
Build:
Build:
82 RELEVANT LINES 82 COVERED LINES
49.72 HITS PER LINE
Source Files on feat-race-promise
  • List 0
  • Changed 8
  • Source Changed 3
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
30 feat-race-promise feat: RaceCancellation PromiseLike support Last update I removed the ability to pass in an existing promise to RaceCancellation and this adds it back. The assumption of this library is you don't create promises you are not ready to make part of ... Pull #4 20 May 2019 11:22PM UTC web-flow travis-ci pending completion  
43 feat-race-promise feat: RaceCancellation PromiseLike support Last update I removed the ability to pass in an existing promise to RaceCancellation and this adds it back. The assumption of this library is you don't create promises you are not ready to make part of ... Pull #4 20 May 2019 11:22PM UTC web-flow travis-ci-com pending completion  
29 feat-race-promise feat: RaceCancellation PromiseLike support Last update I removed the ability to pass in an existing promise to RaceCancellation. The issue is this encourages people who think they should take a promise to later race (this is problematic) to just ... Pull #4 20 May 2019 10:58PM UTC web-flow travis-ci pending completion  
42 feat-race-promise feat: RaceCancellation PromiseLike support Last update I removed the ability to pass in an existing promise to RaceCancellation. The issue is this encourages people who think they should take a promise to later race (this is problematic) to just ... Pull #4 20 May 2019 10:58PM UTC web-flow travis-ci-com pending completion  
28 feat-race-promise feat: RaceCancellation PromiseLike support Last update I removed the ability to pass in an existing promise to RaceCancellation. The issue is this encourages people who think they should take a promise to later race (this is problematic) to just ... push 20 May 2019 10:53PM UTC krisselden travis-ci pending completion  
41 feat-race-promise feat: RaceCancellation PromiseLike support Last update I removed the ability to pass in an existing promise to RaceCancellation. The issue is this encourages people who think they should take a promise to later race (this is problematic) to just ... push 20 May 2019 10:53PM UTC krisselden travis-ci-com pending completion  
See All Builds (86)
  • Repo on GitHub
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

© 2025 Coveralls, Inc