signale.ts 791 B

123456789101112131415161718192021222324252627282930313233
  1. import test from 'ava';
  2. import signale from '../../src/lib/signale';
  3. test('CHECK INFO', (t) => {
  4. const info = signale.info('hello world');
  5. t.is(info, 'ℹ info hello world');
  6. });
  7. test('CHECK WARN', (t) => {
  8. const warn = signale.warn('hello world');
  9. t.is(warn, '⚠ warn hello world');
  10. });
  11. test('CHECK PENDING', (t) => {
  12. const pending = signale.pending('hello world');
  13. t.is(pending, '● pending hello world');
  14. });
  15. test('CHECK SUCCESS', (t) => {
  16. const success = signale.success('hello world');
  17. t.is(success, '✔ success hello world');
  18. });
  19. test('CHECK ERROR', (t) => {
  20. const error = signale.error('hello world');
  21. t.is(error, '✖ error hello world');
  22. });
  23. test('CHECK NOTE', (t) => {
  24. const note = signale.note('hello world');
  25. t.is(note, ' → hello world');
  26. });