Matteo Scandolo | f6acdbe | 2016-12-13 10:29:37 -0800 | [diff] [blame] | 1 | /// <reference path="../../typings/index.d.ts" /> |
| 2 | |
| 3 | import * as angular from 'angular'; |
| 4 | import 'angular-mocks'; |
| 5 | import {main} from './main'; |
| 6 | |
| 7 | describe('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 | }); |