Changeset e29cc2e for trip-planner-front/node_modules/loglevel/test
- Timestamp:
- 11/25/21 22:08:24 (3 years ago)
- Branches:
- master
- Children:
- 8d391a1
- Parents:
- 59329aa
- Location:
- trip-planner-front/node_modules/loglevel/test
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trip-planner-front/node_modules/loglevel/test/default-level-test.js
r59329aa re29cc2e 57 57 }); 58 58 }); 59 60 describe("log.resetLevel() resets the log", function() { 61 it("to warn if no explicit default is set", function(log) { 62 log.setLevel("debug"); 63 log.resetLevel(); 64 65 expect(log).toBeAtLevel("warn"); 66 }); 67 68 it("to info if default is set to info", function(log) { 69 log.setDefaultLevel("info"); 70 log.setLevel("debug"); 71 log.resetLevel(); 72 73 expect(log).toBeAtLevel("info"); 74 }); 75 }); 59 76 }); 60 77 }); -
trip-planner-front/node_modules/loglevel/test/local-storage-test.js
r59329aa re29cc2e 97 97 expect("error").not.toBeTheStoredLevel(); 98 98 }); 99 100 it("log.resetLevel() clears the saved level", function(log) { 101 log.resetLevel(); 102 103 expect(undefined).toBeTheStoredLevel(); 104 expect("info").not.toBeTheStoredLevel(); 105 }); 99 106 }); 100 107 -
trip-planner-front/node_modules/loglevel/test/test-helpers.js
r59329aa re29cc2e 68 68 69 69 self.toBeTheLevelStoredByCookie = function toBeTheLevelStoredByCookie(name) { 70 var level = this.actual .toUpperCase();70 var level = this.actual === undefined ? undefined : this.actual.toUpperCase(); 71 71 var storageKey = encodeURIComponent(getStorageKey(name)); 72 72 73 if (window.document.cookie.indexOf(storageKey + "=" + level) !== -1) { 73 if(level === undefined) { 74 return window.document.cookie.indexOf(storageKey + "=") === -1; 75 } else if (window.document.cookie.indexOf(storageKey + "=" + level) !== -1) { 74 76 return true; 75 77 } else { … … 79 81 80 82 self.toBeTheLevelStoredByLocalStorage = function toBeTheLevelStoredByLocalStorage(name) { 81 var level = this.actual .toUpperCase();83 var level = this.actual === undefined ? undefined : this.actual.toUpperCase(); 82 84 83 85 if (window.localStorage[getStorageKey(name)] === level) {
Note:
See TracChangeset
for help on using the changeset viewer.