FormidableLabs / redux-little-router

A tiny router for Redux that lets the URL do the talking.
MIT License
1.04k stars 113 forks source link

Add navigation confirmation/blocking API #258

Closed tptee closed 6 years ago

tptee commented 6 years ago

Exposes history's navigation confirmation/blocking API.

codecov[bot] commented 6 years ago

Codecov Report

Merging #258 into master will decrease coverage by 0.82%. The diff coverage is 91.66%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #258      +/-   ##
=========================================
- Coverage   99.43%   98.6%   -0.83%     
=========================================
  Files          28      28              
  Lines         354     359       +5     
=========================================
+ Hits          352     354       +2     
- Misses          2       5       +3
Impacted Files Coverage Δ
src/environment/hapi-router.js 100% <100%> (ø) :arrow_up:
src/environment/browser-router.js 100% <100%> (ø) :arrow_up:
src/environment/hash-router.js 100% <100%> (ø) :arrow_up:
src/types.js 100% <100%> (ø) :arrow_up:
src/environment/express-router.js 100% <100%> (ø) :arrow_up:
src/actions.js 100% <100%> (ø) :arrow_up:
src/middleware.js 86.2% <72.72%> (-9.63%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e9c60dd...9b92c10. Read the comment docs.

tptee commented 6 years ago

There's not a great way to test the UNBLOCK branch in the middleware switch statement, and the logic is trivial, so I think it's safe to take the coverage hit here.