@@ -32,7 +32,7 @@ describe('DaffioDocsTableOfContentsComponent', () => {
32
32
fixture = TestBed . createComponent ( DaffioDocsTableOfContentsComponent ) ;
33
33
component = fixture . componentInstance ;
34
34
stubDaffioDoc = new DaffioDocsFactory ( ) . create ( ) ;
35
- component . tableOfContents = stubDaffioDoc . tableOfContents . json ;
35
+ component . tableOfContents = stubDaffioDoc . tableOfContents ;
36
36
fixture . detectChanges ( ) ;
37
37
} ) ;
38
38
@@ -42,15 +42,15 @@ describe('DaffioDocsTableOfContentsComponent', () => {
42
42
43
43
it ( 'should render a .daffio-docs-table-of-contents__item for each entry in the table of contents' , ( ) => {
44
44
const tocItems = fixture . debugElement . queryAll ( By . css ( '.daffio-docs-table-of-contents__item' ) ) ;
45
- expect ( tocItems . length ) . toEqual ( stubDaffioDoc . tableOfContents . json . length ) ;
45
+ expect ( tocItems . length ) . toEqual ( stubDaffioDoc . tableOfContents . length ) ;
46
46
} ) ;
47
47
48
48
it ( 'should label each item with an indent level based on its toc level' , ( ) => {
49
49
const tocLevel1 = fixture . debugElement . queryAll ( By . css ( '.daffio-docs-table-of-contents__item--level-1' ) ) ;
50
50
const tocLevel2 = fixture . debugElement . queryAll ( By . css ( '.daffio-docs-table-of-contents__item--level-2' ) ) ;
51
51
const tocLevel3 = fixture . debugElement . queryAll ( By . css ( '.daffio-docs-table-of-contents__item--level-3' ) ) ;
52
- expect ( tocLevel1 . length ) . toEqual ( stubDaffioDoc . tableOfContents . json . filter ( content => content . lvl === 1 ) . length ) ;
53
- expect ( tocLevel2 . length ) . toEqual ( stubDaffioDoc . tableOfContents . json . filter ( content => content . lvl === 2 ) . length ) ;
54
- expect ( tocLevel3 . length ) . toEqual ( stubDaffioDoc . tableOfContents . json . filter ( content => content . lvl === 3 ) . length ) ;
52
+ expect ( tocLevel1 . length ) . toEqual ( stubDaffioDoc . tableOfContents . filter ( content => content . lvl === 1 ) . length ) ;
53
+ expect ( tocLevel2 . length ) . toEqual ( stubDaffioDoc . tableOfContents . filter ( content => content . lvl === 2 ) . length ) ;
54
+ expect ( tocLevel3 . length ) . toEqual ( stubDaffioDoc . tableOfContents . filter ( content => content . lvl === 3 ) . length ) ;
55
55
} ) ;
56
56
} ) ;
0 commit comments