index.js 454 B

12345678910111213141516171819202122232425
  1. 'use strict';
  2. //
  3. // Order of Levels used in these tests.
  4. // Remark (indexzero): is abstracting this into a helper
  5. // useful in `abstract-winston-transport`?
  6. //
  7. const testOrder = exports.testOrder = [
  8. 'error',
  9. 'warn',
  10. 'dog',
  11. 'cat',
  12. 'info',
  13. 'verbose',
  14. 'silly',
  15. 'parrot'
  16. ];
  17. //
  18. // Actual `testLevels` in the format expected by `winston`.
  19. //
  20. exports.testLevels = testOrder.reduce((acc, level, i) => {
  21. acc[level] = i;
  22. return acc;
  23. }, {});