Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

transforms.spec.ts 706B

123456789101112131415161718192021
  1. import { flow } from '../../src/transforms/index';
  2. import { seedBlock } from '../../src/util';
  3. import { Block } from '../../src/primitives';
  4. const t0 = (b: Block): Block => ({ ...b, description: b.description + ' t0' });
  5. const t1 = (b: Block): Block => ({ ...b, description: b.description + ' t1' });
  6. test('multiple', () => {
  7. const block = seedBlock({ description: 'test' });
  8. expect(flow(t0, t1)(block).description).toBe('test t0 t1');
  9. });
  10. test('one', () => {
  11. const block = seedBlock({ description: 'test' });
  12. expect(flow(t0)(block).description).toBe('test t0');
  13. });
  14. test('none', () => {
  15. const block = seedBlock({ description: 'test' });
  16. expect(flow()(block).description).toBe('test');
  17. });