Skip to content

Commit e77dd52

Browse files
author
maria-hambardzumian
committed
EPMRPP-84449 || coderabbitai comment fix
1 parent 436dddd commit e77dd52

File tree

1 file changed

+32
-24
lines changed

1 file changed

+32
-24
lines changed

__tests__/report-portal-client.spec.js

Lines changed: 32 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -908,15 +908,19 @@ describe('ReportPortal javascript client', () => {
908908
mockClient.finishTestItem('testItemId', finishTestItemRQ);
909909

910910
setTimeout(() => {
911-
expect(spyFinishTestItemPromiseStart).toHaveBeenCalledWith(
912-
expect.any(Object),
913-
'testItemId',
914-
expect.objectContaining({
915-
status: 'skipped',
916-
issue: { issueType: 'NOT_ISSUE' },
917-
}),
918-
);
919-
done();
911+
try {
912+
expect(spyFinishTestItemPromiseStart).toHaveBeenCalledWith(
913+
expect.any(Object),
914+
'testItemId',
915+
expect.objectContaining({
916+
status: 'skipped',
917+
issue: { issueType: 'NOT_ISSUE' },
918+
}),
919+
);
920+
done();
921+
} catch (error) {
922+
done(error);
923+
}
920924
}, 50);
921925
});
922926

@@ -952,21 +956,25 @@ describe('ReportPortal javascript client', () => {
952956
mockClient.finishTestItem('testItemId', finishTestItemRQ);
953957

954958
setTimeout(() => {
955-
expect(spyFinishTestItemPromiseStart).toHaveBeenCalledWith(
956-
expect.any(Object),
957-
'testItemId',
958-
expect.objectContaining({
959-
status: 'skipped',
960-
}),
961-
);
962-
expect(spyFinishTestItemPromiseStart).not.toHaveBeenCalledWith(
963-
expect.any(Object),
964-
'testItemId',
965-
expect.objectContaining({
966-
issue: expect.anything(),
967-
}),
968-
);
969-
done();
959+
try {
960+
expect(spyFinishTestItemPromiseStart).toHaveBeenCalledWith(
961+
expect.any(Object),
962+
'testItemId',
963+
expect.objectContaining({
964+
status: 'skipped',
965+
}),
966+
);
967+
expect(spyFinishTestItemPromiseStart).not.toHaveBeenCalledWith(
968+
expect.any(Object),
969+
'testItemId',
970+
expect.objectContaining({
971+
issue: expect.anything(),
972+
}),
973+
);
974+
done();
975+
} catch (error) {
976+
done(error);
977+
}
970978
}, 100);
971979
});
972980

0 commit comments

Comments
 (0)