material-motion-js icon indicating copy to clipboard operation
material-motion-js copied to clipboard

Use MotionSubjects for operator testing

Open appsforartists opened this issue 8 years ago • 0 comments

Our unit tests currently use a very simple MockObserver, which essentially turns an observer inside-out so its next method may be called by unit tests. Unfortunately, this presumes that there is only one observer per test, an assumption that fails for .velocity(pulse). Thus, we should use MotionSubjects for testing.

TODO

  • [x] Create MotionSubject: export const MotionSubject = withMotionOperators(IndefiniteSubject)
  • [ ] Port all operator unit tests to use MotionSubject instead of createMockObserver()
  • [ ] Delete createMockObserver()

Blocked on #194

appsforartists avatar Apr 25 '17 02:04 appsforartists