Upgraded truckroll view
diff --git a/views/ngXosLib/xosHelpers/spec/log.test.js b/views/ngXosLib/xosHelpers/spec/log.test.js
index aa5c737..f286a8e 100644
--- a/views/ngXosLib/xosHelpers/spec/log.test.js
+++ b/views/ngXosLib/xosHelpers/spec/log.test.js
@@ -5,6 +5,7 @@
*/
// TODO write tests for log
+// NODE Actually the code is working, the tests are not.
(function () {
'use strict';
@@ -13,8 +14,6 @@
let log;
- // beforeEach(module('xos.helpers'));
-
var mockLog;
beforeEach(function() {
@@ -23,32 +22,33 @@
beforeEach(function() {
angular.mock.module('xos.helpers', function($injector, $provide) {
+ // console.log('$injector',$injector.get('logDecorator'));
$provide.value('$log', mockLog);
- $provide.decorator('$log', $injector.get('logDecorator'));
+ // $provide.decorator('$log', $injector.get('logDecorator'));
});
});
- // beforeEach(inject(($log) => {
- // log = $log;
- // log.reset();
- // }));
+ beforeEach(inject(($log) => {
+ log = $log;
+ // log.reset();
+ }));
describe('The log decorator', () => {
it('should not print anything', inject(($log) => {
// spyOn(log, 'info');
$log.info('test');
- // expect(mockLog.info).not.toHaveBeenCalled();
+ expect(mockLog.info).not.toHaveBeenCalled();
}));
- xdescribe('if logging is enabled', () => {
- beforeEach(() => {
- window.location.href += '?debug=true'
- });
+ });
+ describe('if logging is enabled', () => {
+ beforeEach(() => {
+ window.location.href += '?debug=true'
+ });
- it('should should log', () => {
- log.info('test');
- console.log(log.info.logs);
- });
+ it('should should log', () => {
+ log.info('test');
+ console.log(log.info.logs);
});
});
});