|
| 1 | +import { provideHttpClient } from '@angular/common/http'; |
1 | 2 | import { ComponentFixture, TestBed } from '@angular/core/testing'; |
2 | | - |
3 | | -import { DbTableAiPanelComponent } from './db-table-ai-panel.component'; |
| 3 | +import { MatIconTestingModule } from '@angular/material/icon/testing'; |
| 4 | +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; |
4 | 5 | import { Angulartics2Module } from 'angulartics2'; |
5 | 6 | import { MarkdownService } from 'ngx-markdown'; |
6 | | -import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; |
7 | | -import { provideHttpClient } from '@angular/common/http'; |
| 7 | +import { DbTableAiPanelComponent } from './db-table-ai-panel.component'; |
8 | 8 |
|
9 | 9 | describe('DbTableAiPanelComponent', () => { |
10 | | - let component: DbTableAiPanelComponent; |
11 | | - let fixture: ComponentFixture<DbTableAiPanelComponent>; |
| 10 | + let component: DbTableAiPanelComponent; |
| 11 | + let fixture: ComponentFixture<DbTableAiPanelComponent>; |
12 | 12 |
|
13 | | - const mockMarkdownService = { |
14 | | - parse: jasmine.createSpy('parse').and.returnValue('parsed markdown'), |
15 | | - }; |
| 13 | + const mockMarkdownService = { |
| 14 | + parse: jasmine.createSpy('parse').and.returnValue('parsed markdown'), |
| 15 | + }; |
16 | 16 |
|
17 | | - beforeEach(async () => { |
18 | | - await TestBed.configureTestingModule({ |
19 | | - imports: [ |
20 | | - Angulartics2Module.forRoot(), |
21 | | - DbTableAiPanelComponent, |
22 | | - BrowserAnimationsModule |
23 | | - ], |
24 | | - providers: [ |
25 | | - provideHttpClient(), |
26 | | - { provide: MarkdownService, useValue: mockMarkdownService }, |
27 | | - ] |
28 | | - }).compileComponents(); |
| 17 | + beforeEach(async () => { |
| 18 | + await TestBed.configureTestingModule({ |
| 19 | + imports: [Angulartics2Module.forRoot(), DbTableAiPanelComponent, BrowserAnimationsModule, MatIconTestingModule], |
| 20 | + providers: [provideHttpClient(), { provide: MarkdownService, useValue: mockMarkdownService }], |
| 21 | + }).compileComponents(); |
29 | 22 |
|
30 | | - fixture = TestBed.createComponent(DbTableAiPanelComponent); |
31 | | - component = fixture.componentInstance; |
32 | | - fixture.detectChanges(); |
33 | | - }); |
| 23 | + fixture = TestBed.createComponent(DbTableAiPanelComponent); |
| 24 | + component = fixture.componentInstance; |
| 25 | + fixture.detectChanges(); |
| 26 | + }); |
34 | 27 |
|
35 | | - it('should create', () => { |
36 | | - expect(component).toBeTruthy(); |
37 | | - }); |
| 28 | + it('should create', () => { |
| 29 | + expect(component).toBeTruthy(); |
| 30 | + }); |
38 | 31 | }); |
0 commit comments