You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
853 B
33 lines
853 B
4 years ago
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||
|
import { IonicModule } from '@ionic/angular';
|
||
|
|
||
|
import { ListPage } from './list.page';
|
||
|
|
||
|
describe('ListPage', () => {
|
||
|
let component: ListPage;
|
||
|
let fixture: ComponentFixture<ListPage>;
|
||
|
let listPage: HTMLElement;
|
||
|
|
||
|
beforeEach(async(() => {
|
||
|
TestBed.configureTestingModule({
|
||
|
declarations: [ ListPage ],
|
||
|
imports: [IonicModule.forRoot()]
|
||
|
}).compileComponents();
|
||
|
|
||
|
fixture = TestBed.createComponent(ListPage);
|
||
|
component = fixture.componentInstance;
|
||
|
fixture.detectChanges();
|
||
|
}));
|
||
|
|
||
|
it('should create', () => {
|
||
|
expect(component).toBeTruthy();
|
||
|
});
|
||
|
|
||
|
it('should have a list of 10 elements', () => {
|
||
|
listPage = fixture.nativeElement;
|
||
|
const items = listPage.querySelectorAll('ion-item');
|
||
|
expect(items.length).toEqual(10);
|
||
|
});
|
||
|
|
||
|
});
|