Added app, tests, lint to BUCK file for web/gui2
Change-Id: I94912cb18f31db26971b66c9d851fb57f022df54
diff --git a/web/gui2/src/main/webapp/tests/app/fw/remote/urlfn.service.spec.ts b/web/gui2/src/main/webapp/tests/app/fw/remote/urlfn.service.spec.ts
index 5891260..a54458b 100644
--- a/web/gui2/src/main/webapp/tests/app/fw/remote/urlfn.service.spec.ts
+++ b/web/gui2/src/main/webapp/tests/app/fw/remote/urlfn.service.spec.ts
@@ -15,19 +15,29 @@
*/
import { TestBed, inject } from '@angular/core/testing';
+import { LogService } from '../../../../app/log.service';
+import { ConsoleLoggerService } from '../../../../app/consolelogger.service';
import { UrlFnService } from '../../../../app/fw/remote/urlfn.service';
/**
* ONOS GUI -- Remote -- General Functions - Unit Tests
*/
describe('UrlFnService', () => {
- beforeEach(() => {
- TestBed.configureTestingModule({
- providers: [UrlFnService]
- });
- });
+ let log: LogService;
+ const windowMock = <any>{ location: <any> { hostname: 'localhost' } };
- it('should be created', inject([UrlFnService], (service: UrlFnService) => {
- expect(service).toBeTruthy();
- }));
+ beforeEach(() => {
+ log = new ConsoleLoggerService();
+
+ TestBed.configureTestingModule({
+ providers: [UrlFnService,
+ { provide: LogService, useValue: log },
+ { provide: Window, useValue: windowMock },
+ ]
+ });
+ });
+
+ it('should be created', inject([UrlFnService], (service: UrlFnService) => {
+ expect(service).toBeTruthy();
+ }));
});