mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-5422] remove deprecated "async()" from unit tests (#7109)
* remove angualar async from content services * upgrade more tests * upgrade core tests * upgrade tests * fix deprecated constant * fix tests * fix after rebase
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { MinimalNode } from '@alfresco/js-api';
|
||||
import { async, TestBed } from '@angular/core/testing';
|
||||
import { fakeAsync, TestBed } from '@angular/core/testing';
|
||||
import { CardViewBaseItemModel } from '../models/card-view-baseitem.model';
|
||||
import { CardViewUpdateService, transformKeyToObject } from './card-view-update.service';
|
||||
|
||||
@@ -63,7 +63,7 @@ describe('CardViewUpdateService', () => {
|
||||
cardViewUpdateService = TestBed.inject(CardViewUpdateService);
|
||||
});
|
||||
|
||||
it('should send updated message with proper parameters', async(() => {
|
||||
it('should send updated message with proper parameters', fakeAsync(() => {
|
||||
|
||||
cardViewUpdateService.itemUpdated$.subscribe(
|
||||
( { target, changed } ) => {
|
||||
@@ -74,7 +74,7 @@ describe('CardViewUpdateService', () => {
|
||||
cardViewUpdateService.update(property, 'changed-property-value');
|
||||
}));
|
||||
|
||||
it('should send clicked message with proper parameters', async(() => {
|
||||
it('should send clicked message with proper parameters', fakeAsync(() => {
|
||||
|
||||
cardViewUpdateService.itemClicked$.subscribe(
|
||||
( { target } ) => {
|
||||
@@ -84,7 +84,7 @@ describe('CardViewUpdateService', () => {
|
||||
cardViewUpdateService.clicked(property);
|
||||
}));
|
||||
|
||||
it('should send updated node when aspect changed', async(() => {
|
||||
it('should send updated node when aspect changed', fakeAsync(() => {
|
||||
const fakeNode: MinimalNode = <MinimalNode> { id: 'Bigfoot'};
|
||||
cardViewUpdateService.updatedAspect$.subscribe((node: MinimalNode) => {
|
||||
expect(node.id).toBe('Bigfoot');
|
||||
|
Reference in New Issue
Block a user