Skip to content

Instantly share code, notes, and snippets.

@rigelk
Created September 30, 2018 10:35
Show Gist options
  • Save rigelk/fbdaedeca43186bdd9c9cbb65587a410 to your computer and use it in GitHub Desktop.
Save rigelk/fbdaedeca43186bdd9c9cbb65587a410 to your computer and use it in GitHub Desktop.
import {
ComponentFixture,
TestBed
} from '@angular/core/testing'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { RouterTestingModule } from '@angular/router/testing'
import { VideosProvider, VideoService } from '../../shared/video/video.service'
import { VideoUpdateComponent } from '../+video-edit/video-update.component'
import { VideoEditComponent } from '../+video-edit/shared/video-edit.component'
import { VideosModule } from '../videos.module'
import { VideoUpdateModule } from '../+video-edit/video-update.module'
import { NotificationsService, SimpleNotificationsModule } from 'angular2-notifications'
describe('VideoUpdateComponent', () => {
describe('updateVideo', () => {
let videosService: VideosProvider
let service: VideoService
let component: VideoUpdateComponent
let fixture: ComponentFixture<VideoUpdateComponent>
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
FormsModule,
ReactiveFormsModule,
VideosModule,
VideoUpdateModule,
RouterTestingModule,
SimpleNotificationsModule
],
providers: [
NotificationsService
]
}).compileComponents()
fixture = TestBed.createComponent(VideoUpdateComponent)
component = fixture.debugElement.componentInstance
})
test('should exist', () => {
expect(component).toBeDefined()
})
test('should update the video information', async (done) => {
done()
})
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment