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 { TimeAgoPipe } from './time-ago.pipe';
|
||||
import { async, TestBed } from '@angular/core/testing';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { AppConfigService } from '../app-config/app-config.service';
|
||||
import { UserPreferencesService } from '../services/user-preferences.service';
|
||||
import { setupTestBed } from '../testing/setup-test-bed';
|
||||
@@ -36,11 +36,11 @@ describe('TimeAgoPipe', () => {
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(async(() => {
|
||||
beforeEach(() => {
|
||||
userPreferences = TestBed.inject(UserPreferencesService);
|
||||
spyOn(userPreferences, 'select').and.returnValue(of(''));
|
||||
pipe = new TimeAgoPipe(userPreferences, TestBed.inject(AppConfigService));
|
||||
}));
|
||||
});
|
||||
|
||||
it('should return time difference for a given date', () => {
|
||||
const date = new Date();
|
||||
@@ -59,11 +59,11 @@ describe('TimeAgoPipe', () => {
|
||||
|
||||
describe('When a locale is given', () => {
|
||||
|
||||
it('should return a localised message', async(() => {
|
||||
it('should return a localised message', () => {
|
||||
const date = new Date();
|
||||
const transformedDate = pipe.transform(date, 'de');
|
||||
/* cspell:disable-next-line */
|
||||
expect(transformedDate).toBe('vor ein paar Sekunden');
|
||||
}));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user