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.js 784B

1234567891011121314151617181920212223242526272829303132
  1. const {
  2. parse,
  3. stringify,
  4. transforms: { flow, indent, align },
  5. } = require('../../lib/index.cjs');
  6. test('align + indent', () => {
  7. const source = `
  8. /**
  9. * Description may go
  10. * over multiple lines followed by @tags
  11. *
  12. * @my-tag {my.type} my-name description line 1
  13. description line 2
  14. * description line 3
  15. */`;
  16. const expected = `
  17. /**
  18. * Description may go
  19. * over multiple lines followed by @tags
  20. *
  21. * @my-tag {my.type} my-name description line 1
  22. description line 2
  23. * description line 3
  24. */`;
  25. const parsed = parse(source);
  26. const transform = flow(indent(4), align());
  27. const out = stringify(transform(parsed[0]));
  28. expect(out).toBe(expected.slice(1));
  29. });