Skip to content

Commit 5a6aa1e

Browse files
ParsaArvanehPAquentinderoubaix
authored andcommitted
test(accordion): add missing tests
1 parent 898f9f3 commit 5a6aa1e

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/accordion/accordion-config.spec.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,24 @@ import { NgbAccordionConfig } from './accordion-config';
33
import { TestBed } from '@angular/core/testing';
44

55
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+
});
811

12+
it('should have sensible default values', () => {
913
expect(config.closeOthers).toBe(false);
1014
expect(config.destroyOnHide).toBe(true);
1115
});
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+
});
1226
});

0 commit comments

Comments
 (0)