blob: 2409163c45c7c1123cabdfd7b2d92be05a1f5fcf [file] [log] [blame]
Matteo Scandolof6acdbe2016-12-13 10:29:37 -08001/// <reference path="../../typings/index.d.ts" />
2
3import * as angular from 'angular';
4import 'angular-mocks';
5import {main} from './main';
6
7describe('main component', () => {
8 beforeEach(() => {
9 angular
10 .module('app', ['app/main.html'])
11 .component('app', main);
12 angular.mock.module('app');
13 });
14
15 it('should render the header, title, techs and footer', angular.mock.inject(($rootScope: ng.IRootScopeService, $compile: ng.ICompileService) => {
16 const element = $compile('<app></app>')($rootScope);
17 $rootScope.$digest();
18 expect(element.find('xos-header').length).toEqual(1);
19 expect(element.find('xos-footer').length).toEqual(1);
20 }));
21});