SHARE
TWEET
Untitled
a guest
Apr 5th, 2018
63
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- // Component
- import { Component, OnInit, Input } from '@angular/core'
- import { Appointment } from 'app/appointments/models/appointment'
- @Component({
- selector: 'thor-appointment-success',
- templateUrl: './appointment-success.component.html',
- styleUrls: ['./appointment-success.component.scss']
- })
- export class AppointmentSuccessComponent implements OnInit {
- @Input() scheduledAppointment: Appointment
- constructor() {}
- ngOnInit() {}
- }
- // HTML
- <div class="scheduled-appointment-container">
- <div class="cita-date"> {{scheduledAppointment.startDate | appointmentDatePipe: 'EEEE, dd de LLLL a HH:MM a' }} {{scheduledAppointment.endDate|
- date: 'HH:mm'}} </div>
- </div>
- // Test
- import { AppointmentDatePipe } from './../../pipes/appointment-date-pipe.pipe'
- import { async, ComponentFixture, TestBed } from '@angular/core/testing'
- import { AppointmentSuccessComponent } from './appointment-success.component'
- describe('AppointmentSuccessComponent', () => {
- let component: AppointmentSuccessComponent
- let fixture: ComponentFixture<AppointmentSuccessComponent>
- beforeEach(
- async(() => {
- TestBed.configureTestingModule({
- declarations: [AppointmentSuccessComponent, AppointmentDatePipe]
- }).compileComponents()
- })
- )
- beforeEach(() => {
- fixture = TestBed.createComponent(AppointmentSuccessComponent)
- component = fixture.componentInstance
- fixture.detectChanges()
- })
- it('should create', () => {
- expect(component).toBeTruthy()
- })
- })
- // Result
- HeadlessChrome 65.0.3325 (Mac OS X 10.13.3) AppointmentSuccessComponent should create FAILED
- [object ErrorEvent] thrown
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.
