@@ -17,9 +17,9 @@ import { MockBackend } from '@angular/http/testing';
1717< % _ if ( filters . mocha && filters . expect ) { - % >
1818import { expect } from 'chai' ; < % } % > < % if ( filters . uibootstrap ) { % >
1919import { TooltipModule } from 'ngx-bootstrap' ; < % } % >
20- import { FormsModule } from '@angular/forms' ;
20+ import { FormsModule } from '@angular/forms' ; < % if ( filters . ws ) { % >
2121import { SocketService } from '../../components/socket/socket.service' ;
22- import { SocketServiceStub } from '../../components/socket/socket.mock' ;
22+ import { SocketServiceStub } from '../../components/socket/socket.mock' ; < % } % >
2323import { MainComponent } from './main.component' ;
2424
2525describe ( 'Component: MainComponent' , function ( ) {
@@ -41,21 +41,21 @@ describe('Component: MainComponent', function() {
4141 provide : Http ,
4242 useFactory : ( backend : ConnectionBackend , defaultOptions : BaseRequestOptions ) => {
4343 return new Http ( backend , defaultOptions ) ;
44- } , < % _ if ( filters . ws ) { % >
45- deps : [ MockBackend , BaseRequestOptions ] < % } % >
46- } ,
47- { provide : SocketService , useClass : SocketServiceStub } ,
44+ } ,
45+ deps : [ MockBackend , BaseRequestOptions ]
46+ } ,< % if ( filters . ws ) { % >
47+ { provide : SocketService , useClass : SocketServiceStub } ,< % } % >
4848 ],
4949 } ) . compileComponents ( ) ;
5050 } ) ) ;
51- < % _ if ( filters . ws ) { % >
51+
5252 beforeEach ( async ( inject ( [ MockBackend ] , ( mockBackend ) => {
5353 mockBackend . connections . subscribe ( conn => {
5454 conn . mockRespond ( new Response ( new ResponseOptions ( {
5555 body : JSON . stringify ( [ 'HTML5 Boilerplate' , 'AngularJS' , 'Karma' , 'Express' ] )
5656 } ) ) ) ;
5757 } ) ;
58- } )));< % } % >
58+ } )));
5959
6060 beforeEach(async(() => {
6161 fixture = TestBed . createComponent ( MainComponent ) ;
@@ -69,7 +69,7 @@ describe('Component: MainComponent', function() {
6969 } ));
7070
7171 it('should attach a list of things to the controller', () => { < % if ( filters . jasmine ) { % >
72- expect ( comp . awesomeThings . length ) . toEqual ( 4 ) ; < % } else if(filters.mocha) { - % >
72+ expect ( comp . awesomeThings . length ) . toEqual ( 4 ) ; < % } else if(filters.mocha) { % >
7373 < %= expect ( ) % > comp . awesomeThings . length < %= to ( ) % > . equal ( 4 ) ; < % } %>
7474 } ) ;
7575} ) ;
0 commit comments