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.

node-integration.js 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. "use strict";
  2. describe("loglevel included via node", function () {
  3. it("is included successfully", function () {
  4. expect(require('../lib/loglevel')).not.toBeUndefined();
  5. });
  6. it("allows setting the logging level", function () {
  7. var log = require('../lib/loglevel');
  8. log.setLevel(log.levels.TRACE);
  9. log.setLevel(log.levels.DEBUG);
  10. log.setLevel(log.levels.INFO);
  11. log.setLevel(log.levels.WARN);
  12. log.setLevel(log.levels.ERROR);
  13. });
  14. it("successfully logs", function () {
  15. var log = require('../lib/loglevel');
  16. console.info = jasmine.createSpy("info");
  17. log.setLevel(log.levels.INFO);
  18. log.info("test message");
  19. expect(console.info).toHaveBeenCalledWith("test message");
  20. });
  21. it("supports using symbols as names", function() {
  22. var log = require('../lib/loglevel');
  23. var s1 = Symbol("a-symbol");
  24. var s2 = Symbol("a-symbol");
  25. var logger1 = log.getLogger(s1);
  26. var defaultLevel = logger1.getLevel();
  27. logger1.setLevel(log.levels.TRACE);
  28. var logger2 = log.getLogger(s2);
  29. // Should be unequal: same name, but different symbol instances
  30. expect(logger1).not.toEqual(logger2);
  31. expect(logger2.getLevel()).toEqual(defaultLevel);
  32. });
  33. });