From 3029d03caad2d654b6f3b40c1d22d455c0af273a Mon Sep 17 00:00:00 2001 From: Wendell Date: Wed, 20 Mar 2019 16:22:09 +0800 Subject: [PATCH] fix: test --- components/message/nz-message.spec.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/message/nz-message.spec.ts b/components/message/nz-message.spec.ts index f3dfc87f9a..fbaf0eb776 100644 --- a/components/message/nz-message.spec.ts +++ b/components/message/nz-message.spec.ts @@ -14,8 +14,8 @@ describe('NzMessage', () => { let messageService: NzMessageService; let overlayContainer: OverlayContainer; let overlayContainerElement: HTMLElement; - let fixture: ComponentFixture; - let testComponent: DemoAppComponent; + let fixture: ComponentFixture; + let testComponent: NzTestMessageBasicComponent; beforeEach(fakeAsync(() => { TestBed.configureTestingModule({ @@ -38,7 +38,7 @@ describe('NzMessage', () => { }); beforeEach(() => { - fixture = TestBed.createComponent(DemoAppComponent); + fixture = TestBed.createComponent(NzTestMessageBasicComponent); testComponent = fixture.debugElement.componentInstance; }); @@ -177,7 +177,7 @@ describe('NzMessage', () => { it('should container top to configured', fakeAsync(() => { messageService.create('top', 'CHANGE'); - demoAppFixture.detectChanges(); + fixture.detectChanges(); const messageContainerElement = overlayContainerElement.querySelector('.ant-message') as HTMLElement; expect(messageContainerElement.style.top).toBe('24px'); @@ -194,6 +194,6 @@ describe('NzMessage', () => { ` }) -export class NzTestMessageBasicComponent {} +export class NzTestMessageBasicComponent { @ViewChild('contentTemplate') template: TemplateRef; }