Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
Wendell committed Mar 20, 2019
1 parent 62c729d commit 3029d03
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions components/message/nz-message.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ describe('NzMessage', () => {
let messageService: NzMessageService;
let overlayContainer: OverlayContainer;
let overlayContainerElement: HTMLElement;
let fixture: ComponentFixture<DemoAppComponent>;
let testComponent: DemoAppComponent;
let fixture: ComponentFixture<NzTestMessageBasicComponent>;
let testComponent: NzTestMessageBasicComponent;

beforeEach(fakeAsync(() => {
TestBed.configureTestingModule({
Expand All @@ -38,7 +38,7 @@ describe('NzMessage', () => {
});

beforeEach(() => {
fixture = TestBed.createComponent(DemoAppComponent);
fixture = TestBed.createComponent(NzTestMessageBasicComponent);
testComponent = fixture.debugElement.componentInstance;
});

Expand Down Expand Up @@ -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');
Expand All @@ -194,6 +194,6 @@ describe('NzMessage', () => {
</ng-template>
`
})
export class NzTestMessageBasicComponent {}
export class NzTestMessageBasicComponent {
@ViewChild('contentTemplate') template: TemplateRef<void>;
}

0 comments on commit 3029d03

Please sign in to comment.