This repository has been archived on 2021-08-17. You can view files and clone it, but cannot push or open issues or pull requests.
TaskBoard/test/app/dashboard/calendar/calendar.component.spec.ts
2020-05-14 13:12:47 -04:00

45 lines
1.0 KiB
TypeScript

import { TestBed, ComponentFixture } from '@angular/core/testing';
import { CalendarComponent } from 'src/app/dashboard/calendar/calendar.component';
describe('Calendar', () => {
let component: CalendarComponent;
let fixture: ComponentFixture<CalendarComponent>;
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
],
declarations: [
CalendarComponent
],
providers: [
]
}).compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(CalendarComponent);
component = fixture.componentInstance;
});
it('can be constructed', () => {
expect(component).toBeTruthy();
});
it('can create the previous month calendar', () => {
component.month = 0;
component.previousMonth();
expect(component.calendarDays).toEqual(jasmine.any(Array));
});
it('can create the next month calendar', () => {
component.month = 11;
component.nextMonth();
expect(component.calendarDays).toEqual(jasmine.any(Array));
});
});