Cyclejs Time Versions Save

A time driver designed to enable awesome testing and dev tooling

v0.8.0

7 years ago

Thanks to the wonderful @raquelxmoss, we now support using custom equality functions.

See #19 or #20 for more detail.

v0.6.1

7 years ago
  • Fix an issue where the virtual scheduler would advance one frame further than expected

v0.6.0

7 years ago
  • Add support for simultaneous events

E.g:

it("handles multiple events in a single frame", (done) => {
  const Time = mockTimeSource();

  const a        = Time.diagram('---a------');
  const b        = Time.diagram('---b------');
  const expected = Time.diagram('---(ab)---');

  Time.assertEqual(xs.merge(a, b), expected);

  Time.run(done);
});
  • Fail if streams complete at different times
  • Allow testing infinite streams (like .periodic()) without using .take() or completion
it("creates a stream that emits every period ms", (done) => {
  const Time = mockTimeSource();

  const stream = Time.periodic(80);

  const expected = Time.diagram(
    `----0---1---2---`
  );

  Time.assertEqual(
    stream,
    expected
  );

  Time.run(done);
});

This is nice because the previous behavior was to timeout when an infinite stream was used without .take

v0.5.0

7 years ago

Add support for rxjs and most.

For rxjs users:

import {timeDriver, mockTimeSource} from '@cycle/time/rxjs';

For most users:

import {timeDriver, mockTimeSource} from '@cycle/time/most';

Types specific to each stream library are included for TypeScript users.

v0.2.1

7 years ago
  • Use any xstream version
  • Fix module not loading on linux

v0.2.0

7 years ago

Add animationFrames and throttleAnimation.