github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/Decentralized-Energy-Composer-master/angular-app/src/app/Energy/Energy.component.spec.ts (about)

     1  import { async, ComponentFixture, TestBed } from '@angular/core/testing';
     2  import { By } from '@angular/platform-browser';
     3  import { DebugElement } from '@angular/core';
     4  import { BrowserModule } from '@angular/platform-browser';
     5  import { NgModule } from '@angular/core';
     6  import { HttpModule } from '@angular/http';
     7  import { FormsModule, ReactiveFormsModule } from '@angular/forms';
     8  import { Configuration } from '../configuration';
     9  import { DataService } from '../data.service';
    10  import { EnergyComponent } from './Energy.component';
    11  import {EnergyService} from './Energy.service';
    12  describe('EnergyComponent', () => {
    13    let component: EnergyComponent;
    14    let fixture: ComponentFixture<EnergyComponent>;
    15  
    16    beforeEach(async(() => {
    17      TestBed.configureTestingModule({
    18        declarations: [ EnergyComponent ],
    19  imports: [
    20      BrowserModule,
    21      FormsModule,
    22      ReactiveFormsModule,
    23      HttpModule
    24    ],
    25  providers: [EnergyService,DataService,Configuration]
    26      })
    27      .compileComponents();
    28    }));
    29  
    30    beforeEach(() => {
    31      fixture = TestBed.createComponent(EnergyComponent);
    32      component = fixture.componentInstance;
    33      fixture.detectChanges();
    34    });
    35  
    36    it('should create', () => {
    37      expect(component).toBeTruthy();
    38    });
    39  });