File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -3,10 +3,24 @@ import { NgbAccordionConfig } from './accordion-config';
3
3
import { TestBed } from '@angular/core/testing' ;
4
4
5
5
describe ( 'ngb-accordion-config' , ( ) => {
6
- it ( 'should have sensible default values' , ( ) => {
7
- const config = TestBed . inject ( NgbAccordionConfig ) ;
6
+ let config : NgbAccordionConfig ;
7
+
8
+ beforeEach ( ( ) => {
9
+ config = TestBed . inject ( NgbAccordionConfig ) ;
10
+ } ) ;
8
11
12
+ it ( 'should have sensible default values' , ( ) => {
9
13
expect ( config . closeOthers ) . toBe ( false ) ;
10
14
expect ( config . destroyOnHide ) . toBe ( true ) ;
11
15
} ) ;
16
+
17
+ it ( 'should set animation with correct value' , ( ) => {
18
+ expect ( config [ '_animation' ] ) . toBeUndefined ( ) ;
19
+
20
+ config . animation = true ;
21
+ expect ( config [ '_animation' ] ) . toBe ( true ) ;
22
+
23
+ config . animation = false ;
24
+ expect ( config [ '_animation' ] ) . toBe ( false ) ;
25
+ } ) ;
12
26
} ) ;
You can’t perform that action at this time.
0 commit comments