[ACS-6196] await-thenable rule for ESLint, fix issues (#9027)

* fix issues for core lib

* fix content services lib

* fix and cleanup process services

* [ci:force] process services cloud

* [ci:force] align coverage with all libs

* [ci:force] fix the insights
This commit is contained in:
Denys Vuika
2023-10-26 09:33:48 -04:00
committed by GitHub
parent 7ebdce7875
commit ba96ed14b2
45 changed files with 638 additions and 1224 deletions
@@ -48,7 +48,7 @@ describe('VersionManagerComponent', () => {
component.node = node;
nodesApiService = TestBed.inject(NodesApiService);
spyOnListVersionHistory = spyOn(component.versionListComponent['versionsApi'], 'listVersionHistory').and.callFake(() =>
spyOnListVersionHistory = spyOn(component.versionListComponent.versionsApi, 'listVersionHistory').and.callFake(() =>
Promise.resolve(new VersionPaging({ list: { entries: [versionEntry] } }))
);
});
@@ -81,24 +81,25 @@ describe('VersionManagerComponent', () => {
expect(versionCommentEl).toBeNull();
});
it('should emit success event upon successful upload of a new version', async () => {
it('should emit success event upon successful upload of a new version', () => {
fixture.detectChanges();
const emittedData = { value: { entry: node } };
await component.uploadSuccess.subscribe((event) => {
expect(event).toBe(node);
});
let lastValue: Node;
component.uploadSuccess.subscribe((event) => lastValue = event);
component.onUploadSuccess(emittedData);
expect(lastValue).toBe(node);
});
it('should emit nodeUpdated event upon successful upload of a new version', () => {
fixture.detectChanges();
nodesApiService.nodeUpdated.subscribe((res) => {
expect(res).toEqual(node);
});
let lastValue: Node;
nodesApiService.nodeUpdated.subscribe((res) => lastValue = res);
const emittedData = { value: { entry: node } };
component.onUploadSuccess(emittedData);
expect(lastValue).toEqual(node);
});
describe('Animation', () => {