1
- import {
2
- iit ,
3
- it ,
4
- ddescribe ,
5
- describe ,
6
- expect ,
7
- inject ,
8
- async ,
9
- beforeEach ,
10
- beforeEachProviders
11
- } from '@angular/core/testing' ;
1
+ import { inject , async , addProviders } from '@angular/core/testing' ;
12
2
13
3
import { TestComponentBuilder } from '@angular/compiler/testing' ;
14
4
@@ -59,7 +49,6 @@ function getButton(nativeEl: HTMLElement) {
59
49
}
60
50
61
51
describe ( 'ngb-tabset' , ( ) => {
62
-
63
52
it ( 'should render tabs and select first tab as active by default' , async ( inject ( [ TestComponentBuilder ] , ( tcb ) => {
64
53
const html = `
65
54
<ngb-tabset>
@@ -74,10 +63,10 @@ describe('ngb-tabset', () => {
74
63
const tabTitles = getTabTitles ( fixture . nativeElement ) ;
75
64
const tabContent = getTabContent ( fixture . nativeElement ) ;
76
65
77
- expect ( tabTitles [ 0 ] . textContent ) . toMatchPattern ( / f o o / ) ;
78
- expect ( tabTitles [ 1 ] . textContent ) . toMatchPattern ( / b a r / ) ;
79
- expect ( tabContent [ 0 ] . textContent ) . toMatchPattern ( / F o o / ) ;
80
- expect ( tabContent [ 1 ] . textContent ) . toMatchPattern ( / B a r / ) ;
66
+ expect ( tabTitles [ 0 ] . textContent ) . toMatch ( / f o o / ) ;
67
+ expect ( tabTitles [ 1 ] . textContent ) . toMatch ( / b a r / ) ;
68
+ expect ( tabContent [ 0 ] . textContent ) . toMatch ( / F o o / ) ;
69
+ expect ( tabContent [ 1 ] . textContent ) . toMatch ( / B a r / ) ;
81
70
82
71
expectTabs ( fixture . nativeElement , [ true , false ] ) ;
83
72
} ) ;
@@ -103,9 +92,9 @@ describe('ngb-tabset', () => {
103
92
104
93
const tabTitles = getTabTitles ( fixture . nativeElement ) ;
105
94
106
- expect ( tabTitles [ 0 ] . textContent ) . toMatchPattern ( / f o o / ) ;
107
- expect ( tabTitles [ 1 ] . innerHTML ) . toMatchPattern ( / < b > b a r < \/ b > / ) ;
108
- expect ( tabTitles [ 2 ] . textContent ) . toMatchPattern ( / b a z b a z / ) ;
95
+ expect ( tabTitles [ 0 ] . textContent ) . toMatch ( / f o o / ) ;
96
+ expect ( tabTitles [ 1 ] . innerHTML ) . toMatch ( / < b > b a r < \/ b > / ) ;
97
+ expect ( tabTitles [ 2 ] . textContent ) . toMatch ( / b a z b a z / ) ;
109
98
} ) ;
110
99
} ) ) ) ;
111
100
0 commit comments