npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript.Learn more »

material-motion-testing-utils

0.0.0 • Public • Published

logo Material Motion: Testing utils

Utilities for testing the Material Motion framework

Usage

 
import {
  createMockObserver,
  useMockedRAF,
} from 'material-motion-testing-utils';
 
declare('TestableThing',
  useMockedRAF(
    (mockRAF) => {
      it('should do something with requestAnimationFrame',
        () => {
          const mockObserver = createMockObserver();
 
          const someStream = new MotionObservable(mockObserver).debounce();
          someStream.subscribe(someListener);
 
          mockObserver.next(4);
          mockObserver.next(5);
          mockObserver.next(6);
 
          mockRAF.step();
 
          expect(someListener).to.have.been.calledWith(6);

Installation

yarn add material-motion-testing-utils

License

Apache 2.0

install

npm i material-motion-testing-utils

Downloadsweekly downloads

0

version

0.0.0

license

Apache-2.0

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability