material-motion-js
material-motion-js copied to clipboard
Use MotionSubjects for operator testing
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
MotionSubjectinstead ofcreateMockObserver() - [ ] Delete
createMockObserver()
Blocked on #194