Skip to content

Commit

Permalink
fix: presenter image prefix in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
berenteb committed Apr 19, 2024
1 parent 67a8424 commit e3bd10b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 0 additions & 1 deletion .run/All Tests.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<node-interpreter value="project" />
<jest-package value="$PROJECT_DIR$/node_modules/jest" />
<working-dir value="$PROJECT_DIR$" />
<jest-options value="--watch" />
<envs />
<scope-kind value="ALL" />
<method v="2" />
Expand Down
9 changes: 6 additions & 3 deletions __tests__/services/conference.service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,16 @@ it('should return formatted timestamp', () => {

it('should return conference data with sorted presentations', async () => {
const conferenceData = {
presentations: [{ startTime: '2022-01-01T12:00:00' }, { startTime: '2022-01-01T11:00:00' }],
presentations: [
{ startTime: '2022-01-01T12:00:00', presenter: { pictureUrl: '/path' } },
{ startTime: '2022-01-01T11:00:00', presenter: { pictureUrl: '/path' } },
],
};
axiosInstance.get = jest.fn().mockResolvedValue({ data: conferenceData });

const sortedConferenceData = await ConferenceService.getConferenceData();
expect(sortedConferenceData.presentations).toEqual([
{ startTime: '2022-01-01T11:00:00' },
{ startTime: '2022-01-01T12:00:00' },
{ startTime: '2022-01-01T11:00:00', presenter: { pictureUrl: 'https://konferencia.simonyi.bme.hu/path' } },
{ startTime: '2022-01-01T12:00:00', presenter: { pictureUrl: 'https://konferencia.simonyi.bme.hu/path' } },
]);
});

1 comment on commit e3bd10b

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 94.06% 95/101
🟢 Branches 84.91% 45/53
🟢 Functions 97.56% 40/41
🟢 Lines 93.62% 88/94

Test suite run success

50 tests passing in 11 suites.

Report generated by 🧪jest coverage report action from e3bd10b

Please sign in to comment.