vigetlabs / microcosm

Flux with actions at center stage. Write optimistic updates, cancel requests, and track changes with ease.
http://code.viget.com/microcosm/
MIT License
487 stars 29 forks source link

[microcosm] Add flow types for scheduler #523

Closed nhunzaker closed 6 years ago

nhunzaker commented 6 years ago

What

Adds flow type definitions for Microcosm's scheduler.

Why

The scheduler is a critical piece of Microcosm 13, and it didn't have any flow type coverage.

Adding flow types uncovered a bug where Observable was accessing the scheduler's error handler from the wrong namespace. This PR additionally adds test coverage for that case.

nhunzaker commented 6 years ago

@leobauza I think your eyes are great :)

codecov-io commented 6 years ago

Codecov Report

Merging #523 into master will increase coverage by 0.12%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #523      +/-   ##
==========================================
+ Coverage   93.75%   93.88%   +0.12%     
==========================================
  Files          32       32              
  Lines         801      801              
  Branches      162      162              
==========================================
+ Hits          751      752       +1     
+ Misses         43       42       -1     
  Partials        7        7
Impacted Files Coverage Δ
packages/microcosm/src/scheduler.js 90.9% <100%> (ø) :arrow_up:
packages/microcosm/src/observable.js 88.98% <100%> (+0.84%) :arrow_up:

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 308ebfd...ed603ac. Read the comment docs.